Versions Compared

Key

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

...

Info

Both Copy Space and Copy Page Tree currently do not rewrite links for the space key if they are "a href" links (as opposed to "SFXML a:link" links). 

  • The space key is the unique string/key used to identify the space that a page or other resource lives in.
 
  • When a space or page tree is copied from one space to another space the space key in links is rewritten to change it from the source space key to the destination space key.
 
    • Thus, links within a space continue to work in a new copy in a different space.

If a space key is not rewritten in a link then the symptom you will notice is that clicking on a link in a new space will go back to the page/resource in the original space, not in the new space.

...

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>

...


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>

...


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>

{code}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.

...