-
Bug
-
Resolution: Won't Fix
-
High
-
None
-
4.0.5, 4.2.1
-
None
If you insert a relative link, then it should remain relative. This means that, if you copy the source of the page from one space to another, then the relative links should point to pages in the new space, not to pages in the original space.
I have just tested the scenario described by a customer in a support case:
- In the DOC space on CAC, I created a page called "Sarah test 1". I added three links that should be relative. All of them point to a page called "Supported Platforms". To create the links, I added one via the links autocomplete, one via the Search tab in the links browser, and one via the Advanced tab in the links browser.
- Both the DOC space and the JIRA space already have a page with the same name, "Supported Platforms".
- In the JIRA space on CAC, I created another page called "Sarah test 1", and copied the content from the above page. To copy it, I opened the above page in the editor, selected all the content, pressed Ctrl+C, then pasted the content into my new page.
- Problem: The links are not relative in the new page. They still point to the DOC space, whereas they should point to the identically-named page in the JIRA space.
See screenshots attached.
- is related to
-
CONFSERVER-26132 Relative internal links wrongly become absolute when the linked page is renamed or moved to the same space
-
- Closed
-
- relates to
-
CONFSERVER-23332 Pasting Confluence content in editor should copy embedded images to destination page
- Closed
Thanks very much smaddox for the excellent write-up above!
Just to add, if you have the Confluence source editor plugin (which is essentially an editor for Confluence's underlying storage format) installed in your Confluence site, you should be able to convert 'absolute' links (i.e. which target pages in the original space you copied the 'source' content from) into 'relative' ones by:
<ri:page ri:content-title="Name of page being linked to" ri:space-key="ORIGINALSPACE"/> elements which define your links, so that these elements become just
<ri:page ri:content-title="Name of page being linked to"/>.
For example:
Remove the ri:space-key="DOC" attribute from the
<ri:page ri:content-title="Supported Platforms" ri:space-key="DOC"/> so that it becomes just
<ri:page ri:content-title="Supported Platforms"/>