Confluence Cloud New Editor breaks links to Confluence pages

tldr; Confluence Cloud New Editor represents links to Confluence pages as<a href=%baseUrl%/spaces/%spaceKey%/pages/%pageId%/%pageTitle%">link title</a> instead of <ac:link ac:card-appearance="inline"><ri:page ri:content-title="%pageTitle%" ri:version-at-save="1" /><ac:link-body>link title</ac:link-body></ac:link>, which breaks existing features.

When exactly this happens seems to be instance specific:

  1. on all instances I tried using a custom link text changed the storage format representation from <ac:link> to <a>
  2. on one instance I tried every link I created resulted in a <a> representation

The effect of this is:

  • link titles don’t get updated when a page is renamed
  • export/import of spaces does not work - neither on a single instance (links point to non-existant pages) nor when transferring from one instance to another (points to pages on origin instance)
  • the link is not shown in incoming links on the targeted page; consequentially a warning is not given when attempting to delete a page that would have incoming links (if they were not misrepresented)
  • the link is shown as an external link in ‘Outgoing links’
  • copy page tree API does not rewrite links inside a page tree

For bullet 1 we have had a DEVHELP-3892 ticket for this since 26/Nov/19, we had some feedback from @nmansilla, but the Confluence Cloud team never came back with any info :frowning:

Now bullet 2 has emerged on some instances

This really sucks - this is not about some exotic combination of API calls inside an app, but it is pure Confluence core functionality.

9 Likes

Bullet point 2 seems to be gone again - but putting a text in a link reliably makes it <a> link and thus has all the listed effects (other than the first one, which makes no sense for a custom text

1 Like

Hi @christoffer, I’m a Confluence Cloud PM recently moved to the Ecosystem area. We’re following up on DEVHELP-3892. Please check that ticket for update. Would you like to combine the two bullet points into the same issue to track or keep them separate?

Warmly,
Elaine Hankins

We are also interested in the outcome of this investigation, so if you can post back here with conclusions that would be appreciated.

This is my analysis from March this year:

When adding links on pages that still use the old editor, they are saved properly using <ri:page> references, so those references are updated correctly when copying the page tree.

When adding links on pages that use the new editor, they are now saved properly when no custom link text is specified. When a custom link text is specified (the UI for this is broken, by the way, specifying a link text during link creation ignores that text, only updating it later works), links are stored a <a href>s with the absolute page URLs. Also, in previous versions of the new editor, all links were stored like that (also the ones with no custom link text), so there are still pages out there with the wrong format.

Atlassian has now created CONFCLOUD-70886 to work on the issue.

We reported this to Atlassian back in November 2019. Our problem back then was that our app was relying a lot on the Copy Page Hierarchy API, and relative links within the page hierarchy were not properly updated if they were stored in the wrong format. Since the issue was not fixed but critical for our app, we implemented a workaround. We are now copying page by page using the Copy Single Page API and updating relative links by hand. Since Cloud links using absolute URLs are using the page ID to identify the page (rather than the page title as on Server), we don’t know that ID before the copy operation has finished. So after the page is copied, we update the links and save a second revision of the copied page.

2 Likes

Hi @ElaineH,
nice to finally get some feedback and thanks for your effort.
I can’t reproduce bullet point 2 anymore, so it seems that has been fixed.
The ticket https://jira.atlassian.com/browse/CONFCLOUD-70886 is not representing any of the problems that the broken links are causing - this is not about the copy page hierarchy API, but about breaking Confluence functionality. Would be nice to take that into account.
Cheers, Chris

1 Like