-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
4.3.7, 5.1, 5.4.4, 5.7.3, 6.2.3, 6.3.4, 6.6.3
-
5
-
Severity 2 - Major
-
5
-
Problem
- Links to an anchor in a Confluence page of another space are broken when they are edited.
Steps to Reproduce
- Select the text that you want to link
- Click Insert >> Link, and go to Advanced tab
- In the Advanced tab, configure the link to point to an anchor in another page using this format:
SPACEKEY:PageName#AnchorName
- Save the link and the page.
- Click the link.
- Return to the page you edited and re-edit the link.
- Save the link without making any changes and save the page.
- Click the link.
- Return to the page you edited and attempt to re-edit the link.
Expected Results
- Both times it is clicked, the link should take you to the correct destination page and scroll to the anchor.
Actual Results
- The link only works the first time.
- When you return and edit the link, the "SPACKEY:" prefix is removed without notice. The link becomes:
PageName#AnchorName
- When this problem occurs, clicking the link takes you to a Create view to create a page with that name in the current space.
Notes
On the first edit the link configuration appears to be correct in the source markup:
<ac:link ac:anchor="ANCHORNAME"> <ri:page ri:content-title="PAGETITLE" ri:space-key="SPACKEY"/> <ac:plain-text-link-body><![CDATA[LINKTEXT]]></ac:plain-text-link-body> </ac:link>
When editing the second time the source markup is unchanged, but in the Edit dialog the space prefix is removed:
After the second edit the ri:space-key parameter is dropped.
<ac:link>
<ri:page ri:content-title="Disabling and enabling apps"/>
<ac:plain-text-link-body><![CDATA[enable safe mode]]></ac:plain-text-link-body>
The original reporter also noted, "It used to be uneditable prior to 4.3.6, as it was fixed in that version."
Workaround
Use the "Web Link" option instead and paste in the absolute/static URL, e.g. http(s)://HOST/SPACEKEY/PAGE#ANCHOR
NOTE: This link breaks if the name or space of the target page is changed.
- causes
-
CONFSERVER-29836 Anchor links broken after copying page to another space
-
- Closed
-
- is a regression of
-
CONFSERVER-25573 Link dialog doesn't allow editing of advanced links
-
- Closed
-
-
CONFSERVER-24624 Links to anchors on other pages in Confluence 4.0+ cannot be edited.
-
- Closed
-
- is duplicated by
-
CONFSERVER-32027 Advanced links that point to anchors in other spaces break upon editing
-
- Closed
-
-
CONFSERVER-32363 Space key is lost when editing link
-
- Closed
-
- is related to
-
CONFSERVER-24624 Links to anchors on other pages in Confluence 4.0+ cannot be edited.
-
- Closed
-
The only reliable workaround I have found for this is to copy a table of contents entry from the source page and use that as the link instead of linking to an anchor.