You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have a space with multiple pages. In the pages I have links to other pages in the same space. I had to copy the whole space. Now all links of the pages in the copied space refers to the pages in the old space.
I want that the links would refer on the page in the copied space.
I have thousands of pages with links in that space and to change those manually it would take a lot of time. Is there maybe a workaround?
I am with the ScriptRunner Support Team.
Following up on @Andrii Maliuta's comment, we do have an example of a find-and-replace script that you can use with ScriptRunner to bulk update Confluence's page storage format.
From what I understand, the links in the target Space refer to the pages in the source Space. If that is the case, you would need to update the parameter value of ri:space-key from the source-space key, to the target-space key.
For reference, here is what the Confluence Link storage looks like:
ri:content-title="PAGE TITLE HERE"
Let me know if you have any further questions!
Hello @Dominik Gashi ,
Looks like you set those links as WEB links and not as Confluence Smart links
so it is treated as just href HTML text and after you move or copy the page it will remain static.
If you set links to Confluence pages/blogs/attachments as SMART links, it will adjust when renaming/copying/moving as needed.
You can change the links format using scripts or custom apps.addons.
Hello @Andrii Maliuta ,
Thank you for your message and for your help! The links we are using are normal links that refer to a page on that space. When copying the whole space in refers still to the old page in the old space not in the copied page in the copied space.
I think smart links are only available in Cloud. We are on Confluence Server. You mentioned that it's possible to change the links with apps. Do you know by change an app that can do that?
the 2nd link I mentioned is for Server/Data Center (
Please check the Storage Format of the links on pages if it is simple 'a:href' or it is xHTML 'ac:link'. The Confluence wise links are of ac:link type.
>> You mentioned that it's possible to change the links with apps. Do you know by change an app that can do that
Yes, you just need to change the format of the link inside page body.
For this you can use tools ScriptRunner with Java API or any HTP client and REST API.