When creating a link to a specific place on the same page sometimes the link that shows up when viewing the page is constructed in an inconsistent manner and doesn't work properly.
We have some very large pages with lots of sections, and all the links are creating in the GUI under advanced links and typing #anchorname
Sometimes after you save this page, these links will translate to:
https://<server>/<pagename>#<anchorname> and the link will work properly. However, sometimes it also does this:
https://<server>/viewpage.action?pageId=<pageid>#<anchorname>
The problem with this URL, is this actually links back typically to a previous version of the document. So when a user clicks the bookmark, instead of scrolling on the existing document to the correct location, it actually loads a previous version of the same page and then attempts to go to that location.
Can anyone explain what is causing this? In the edit page, if I go and edit these links and look at the GUI, they all look the same. Once you edit the page and edit them, they all have <pagename>#<anchorname> in the Link field.
Even more strange, we have some documents where I know the links had worked originally, but after multiple edits (but not mucking with links) and then saving the page, it has reverted to translating this to the viewpage.action? approach, which now of course, loads previous revisions of the page.
Also note that in all cases, we also use Scroll Word exporter. When exporting these pages to word via that plugin, the anchors/links all get properly created and inside of word the links go to the correct place within the document.
Any help with understanding this strange behavior and how we can fix it would help.