Problem with anchor hyperlinks after upgrade (from 3.x to 4.3.2)
Asked by Steffen Heller:

Hello,

on our wiki pages we have a lot of anchor hyperlinks that were created using the old wiki syntax:

```
[linkname|linkURL#anchorname]
```

In the old confluence version these hyperlinks worked fine. After exporting the pages to PDF the hyperlinks

1. created links within the PDF and
2. a suffix saying "see page xyz" (where "xyz" was replaced with the content of the css "target-counter(attr(href), page)"

After the upgrade to version 4.3.2 this only works partly:

1. the links withing the PDF don't work and the "target-counter(attr(href), page)" is left blank when the hyperlink has an anchor and the anchor and the link to the anchor are on different confluence pages
2. for hyperlinks without an anchor or for hyperlinks where anchor and link are on the same confluence page it still works like before

Now I am searching for explanations.

Does anybody know if anything has changed about hyperlinks? Or about the css? Has version 4.3.2 a different confluencedefaultpdf.css? Or is there anything else that I might have overlooked or that has changed?

Thanks, Steffen


Answers:
author: Steffen Heller
body: Okay, I found the answer. There is a bug and it is described here:

<https://jira.atlassian.com/browse/CONF-23324>

<https://jira.atlassian.com/browse/CONF-25903>

<https://jira.atlassian.com/browse/CONF-24624>


author: Sanet Minnie
body: Hi Steffen, probably not the same, but also a major issue for us ([https://answers.atlassian.com/questions/110353/upgrade-to-confluence-4-3-broke-the-links-to-headings-on-same-page](/questions/110353/upgrade-to-confluence-4-3-broke-the-links-to-headings-on-same-page)). I was hoping your solution will give me an idea on how to solve mine :-)

I cannot wait for a fix, so I will have to fix it manually, nasty thing is, I cannot search for the links - I have no idea where in the THOUSANDS of pages we have used them :-(.


author: Sanet Minnie
body: Hi, did you find a solution for this, we have the same problem with same page links that are now broken.

comments: author: Steffen Heller
body: No, I didn't find a solution. And I don't really know how to go on from here knowing that it is a known bug: Does it make sense to wait for a (possible) fix or is it better to start reworking the pages right away?

Same page links should still work, though. Are you sure you have the same problem?


author: Thomas Berger
body: We inject the #anchorname using the Reporting Plugin in Confluence v3.5, however the 'new' anchor macro in v4.3.x doesn't accept injected values. It doesn't even put 'broken' page anchors in HTML (confluence-anchor-link).


author: Steffen Heller
body: Hello again,

I tried to break the whole thing down and simplify it a bit:  
Could it be that linking to an anchor on another confluence page just does not fully work?

I recognized that there is a description at [Linking to an anchor or heading](https://confluence.atlassian.com/display/CONF43/Linking+to+Pages#LinkingtoPages-LinkingtoanAnchororHeading "Linking to an anchor or heading"). But when I follow this instruction and enter a combination of pagename#anchorname at "Edit Link \> Advanced \> Link:" the information seems to get lost and when I try to open and edit the link again the input field is empty again. For all other links this is not the case.

Also, the description unterneath the input field only says "To insert a link to a new page, type in the desired page title. To insert an anchor link, type #anchorname" but does not mention the combination of new page and anchor.

And after exporting my confluence pages to PDF all other links turn into internal references within the PDF whereas the pagename#anchorname links turn into http links to the confluence html pages.

All this seems to me as if the pagename#anchorname links could not be resolved properly thus creating these strange results.

Again, any ideas are more than welcome. Unfortunately all my documents are built upon using anchored links for table of contents and cross references and not solving this would mean a lot of extra work for me.


Tags: anchor

export

link