Broken links in pdf
1. Create 2 pages: page 1 and page 2
2. On page 1 create a link to page 2
3. Delete page 2
4. Export page 1
5. The broken link will be in the pdf
How to exclude such links from the document?
Source code:
<p><ac:link><ri:page ri:content-title=""Amendment Report" report" /><ac:plain-text-link-body><![CDATA["Amendment Report" report]]></ac:plain-text-link-body></ac:link></p>
Link in view mode:
https://wiki/pages/createpage.action?spaceKey=PLATRU&title=%22Amendment+Report%22+report&linkCreation=true&fromPageId=338465106
pdf:
-
Hi there, thanks for reaching out to us.
Unfortunately, when deleting a page which has a link already established to it, the link will still be formatted in such a way in the storage format for the page which our Exporter uses. Confluence does not automatically remove the formatting from the related broken link.
When deleting a page that is linked to Confluence will notify users that an incoming link will break as a result of the deletion:
However, the link is still formatted in as a <ac:link> which our app then process in the export accordingly. The only way to prevent this would be to either;
- clear the formatting for the associated link on the page using the Confluence editor tool
- nest the link text within a Scroll Ignore macro
- suppress the Confluence link in the export by using the related export option that can be defined in the custom export template (please note this setting will be applied to all related link types)
Regards, Thomas
-
Thomas, hi!
I don't like your solution.
I think you need to improve the pdf exporter.Add an option to exclude such links. You can analyze the 'body.view' for the source text of the page. If the link has text '/pages/createpage.action?', then do plain text instead of the broken link.
-
Hi Pavel, thanks for the reply.
Was there a reason why you still wanted to keep the link formatting for the 'dead' link in the Confluence view but to disregard this in the export?
After deleting the page that is referenced by the link, the link in the Confluence page view will not function when clicked and will display in the bordeaux colour (like shown in your initial screenshot). Did you not require the page view to also display correctly?
Kind regards, Thomas
-
Hi Pavel, thanks for your reply and the additional information.
We have created the following feature request for the option to suppress broken Confluence links - https://k15t.jira.com/browse/EXP-3198
Unfortunately, I am unable to provide a time-frame in regards to when this may be focused on. However, please login to your Atlassian account for our JIRA via https://k15t.jira.com/ in the top right hand corner (or alternatively sign up if you don’t have an account) in order to watch and comment on this issue. We'll then send a notification for every status update.
If you have problem viewing this issue, please can you try opening a new incognito browser window and then select the link. Often, browser windows that are already signed into an account can cause some conflicts. Once viewing the issue you can select the login profile icon in the top right hand corner to sign into your Atlassian account or to sign up. After this, you can then watch the issue.
In the meantime, there also remains a few app options on the Atlassian Marketplace that offer link error information for Confluence pages which may be worth investigating should you require a solution immediately.
I hope this information helps. Thanks, Thomas
Please sign in to leave a comment.
Comments
8 comments