It’s perfect that wiki links will be updated, if the page it links to changes it’s name / destination.
But what most users do is copying wiki urls from the browsers address bar instead of using the wiki intern links. Now I’m dreaming of a solution that will repair those urls pointing to the wiki itself to intern links.
Is someone out there with such a script? Otherwise I would try to create an event “on save”. But I would need a lot of time to fulfill this. Any hints or snippets?
Anyone using the old url is going to either get
a) a broken link or
b) a html redirect to redirect from the old url to the new url
The second option happens happens if you’ve ticked the “CREATE AN AUTOMATIC REDIRECT” checkbox on the page rename page.
If people copy and use the old url - other than redirecting them to the new page automatically, there is nothing you can do to reach out and change their saved url.
Please correct me if I have not properly understood your question.
We have the same problem/wish. I tried writing an on save listener that finds absolute urls to the wiki and replaces them with internal links, but I could not find a safe way to get the name of the article from the url, because special characters can cause errors here.
I think you need to call the api to get the internal link/name, but I just could not figure out how to.
The “create an automatic redirect”-checkbox would be a solution, if the users would tick it - they just don’t.
The part in the beginning of the url shows me that this url is part of my wiki. So how can I look now into database for the internal wiki link? Just replacing Sandbox/TestPage1 with Sandbox.TestPage1 won’t work as helena already said due to special characters.
Works like charm except for urls with anchors and subwikis as described in section limitations. To be clear it works inside a subwiki but couldn’t handle urls to other subwikis (including the „main“ subwiki).
hmm I don’t see any limitation mentioned about links between subwikis in the doc. Thus I think that’s supposed to work. I also don’t see an existing issue about it: Loading...
Could you raise a new jira issue with explanations how to reproduce?