Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The cloud apps Copy Page Tree and Copy Space have enhancement request records to add support for rewriting space keys in "a href" links.  See CPTC-60 and CSOD-38.  Upvote them if you would like to have "a href" rewriting in these apps.

...

The Copy Page Tree app rewrites the space key for page links.

BEFORE COPY to a different space:{

Code Block

...

<p>Link to page in this tree: <ac:link ac:card-appearance="inline"><ri:page ri:content-title="Child Page" ri:version-at-save="2" /><ac:link-body>Child Page</ac:link-body></ac:link> </p>


{code}AFTER COPY to different space:{

Code Block

...

<p>Link to page in this tree: <ac:link ac:card-appearance="inline"><ri:page ri:space-key="delTureCopy3" ri:content-title="Child Page" ri:version-at-save="2" /><ac:link-body>Child Page</ac:link-body></ac:link> </p>


{code}The copy app does NOT (currently) rewrite links for regular HTML markup"regular" "a href" links:{

Code Block

...

<p>Link to page in this tree, edited to have title: <a href="https://myinstance.atlassian.net/wiki/spaces/TS/pages/102334476/Child+Page">Child Page Link</a> </p>

...

That link would remain the same after a copy operation, so the new copy will still link to the origin space.


Some people have edited their links so that they became "a href" links instead of SFXML "ac:link" links.  The may not realize that they have changed the links from SFXML "ac:link" to "a href".

One reason that people are editing SFXML "ac:link" links is because there is an Atlassian bug that incorrectly renders ac:link page links for anonymous users (CONFCLOUD-68023).

The edit their ac:link page links to add display text so that the link will always show the page title instead of showing an ugly link for anonymous users.

...

In Sven's case, he had edited SFXML links to workaround the anonymous user issue of CONFCLOUD-68023 and then ran into the problem of that turning the link from "ac:link" to "a href". To workaround that, he edited the link to delete the protocol and domain so that it became a relative link:


edit EDIT THIS:{

Code Block

...

https://myinstance.atlassian.net/wiki/spaces/TS/pages/102334476/Child+Page


{code}to beTO BECOME THIS:{

Code Block

...

/wiki/spaces/TS/pages/102334476/Child+Page

...

and Confluence turns the link back into a SFXML ac:link. Then it will be properly rewritten to point to destination space for a space copy.

...