Confluence
  1. Confluence
  2. CONF-3844

Anchor links to the current page break when included in a different page

    Details

    • Last commented by user?:
      true
    • Internal Complexity:
      5
    • Internal Value:
      4

      Description

      Anchors automatically rendered with the page name in front of the anchor, eg #anchor name becomes #page-anchor name. This was done in Confluence 2.0 to fix anchor links in space PDF exports.

      Unfortunately, this has the side effect of breaking anchor links on pages which are included via the

      {include}

      or

      {excerpt-include}

      macro in a different Confluence page.

        Issue Links

          Activity

          Hide
          Guy Fraser [Adaptavist.com] added a comment - - edited

          I've not tried it in the include macro, but in normal links I can still use the anchors like this:

          [some text|space:page#anchor]
          

          Confluence seems to automatically conver the anchor to #page-anchor when rendering the content...

          Show
          Guy Fraser [Adaptavist.com] added a comment - - edited I've not tried it in the include macro, but in normal links I can still use the anchors like this: [some text|space:page#anchor] Confluence seems to automatically conver the anchor to #page-anchor when rendering the content...
          Hide
          Igor Minar added a comment -

          The description in this bug report is not quite correct. The issue really affects only included pages. Check out duplicate report CONF-16551 for a better description and an example.

          Show
          Igor Minar added a comment - The description in this bug report is not quite correct. The issue really affects only included pages. Check out duplicate report CONF-16551 for a better description and an example.
          Hide
          Ole added a comment -

          Hello,
          seems like the redirect link from one page to another page`s anchor does not work.
          Internet Explorer 8 redirects to the anchor. All other browsers do not redirect and just redirect the right page but not to the anchor or headline. Tried it with different machines , browsers and operating systems.

          I think, the browser is jumping to the right page and anchor for few milliseconds but refreshes then. The refresh is triggert by the top search bar of confluence or something else. Please notice the forum discussion and reported issue . (Links at the buttom of this text)
          I think i am using the right code, that is written down in your documentation.
          redirect code that is placed on another page :

           [spacekey:page_name_1#test123] 

          anchor is placed on the page "page_name_1":

           {anchor:test123} 

          Mr Andy Brook already reproduced the bug. Refering to:
          http://jira.atlassian.com/browse/CONF-16538
          http://forums.atlassian.com/thread.jspa?threadID=35980&tstart=30
          Hopefully you can fix this annoying bug quickly !

          Thanks a lot !
          Ole Busmann

          Show
          Ole added a comment - Hello, seems like the redirect link from one page to another page`s anchor does not work. Internet Explorer 8 redirects to the anchor. All other browsers do not redirect and just redirect the right page but not to the anchor or headline. Tried it with different machines , browsers and operating systems. I think, the browser is jumping to the right page and anchor for few milliseconds but refreshes then. The refresh is triggert by the top search bar of confluence or something else. Please notice the forum discussion and reported issue . (Links at the buttom of this text) I think i am using the right code, that is written down in your documentation. redirect code that is placed on another page : [spacekey:page_name_1#test123] anchor is placed on the page "page_name_1": {anchor:test123} Mr Andy Brook already reproduced the bug. Refering to: http://jira.atlassian.com/browse/CONF-16538 http://forums.atlassian.com/thread.jspa?threadID=35980&tstart=30 Hopefully you can fix this annoying bug quickly ! Thanks a lot ! Ole Busmann
          Hide
          Ole added a comment -

          Hi,

          is there any chance that atlassian will fix this bug in short time ?

          Greetings

          Ole

          Show
          Ole added a comment - Hi, is there any chance that atlassian will fix this bug in short time ? Greetings Ole
          Hide
          Anatoli Kazatchkov [Atlassian] added a comment -

          Hi Ole,

          Unfortunately there is very little chance that this bug will be fixed in short term. We try to prioritise issues according to their severity, impact, number of customers affected, availability of a work around and number of votes. There is always a huge bucket of issues and we try to fix those that have higher priority. This issue has not yet made it to the top of 'fix for' list.
          Please comment/vote if you disagree and think that it should be fixed soon.

          Anatoli.

          Show
          Anatoli Kazatchkov [Atlassian] added a comment - Hi Ole, Unfortunately there is very little chance that this bug will be fixed in short term. We try to prioritise issues according to their severity, impact, number of customers affected, availability of a work around and number of votes. There is always a huge bucket of issues and we try to fix those that have higher priority. This issue has not yet made it to the top of 'fix for' list. Please comment/vote if you disagree and think that it should be fixed soon. Anatoli.
          Hide
          Gavin Bee added a comment -

          There are only 34 bugs that have recent updates AND were created in 2005 or earlier. Surely something can be done to ensure that these issues get higher weighting in the priority list. At this point, you are unlikely to get more votes on these issues because people now assume that confluence just can't handle anchors properly and avoid them.

          Personally, I am now in the habit of hardcoding the link to an anchor. This annoys me to no end because the DNS names of our confluence servers all changed recently. All of my anchor links are broken

          The query to find old bugs with recent activity is "project = CONF AND issuetype = Bug AND status in (Open, Reopened) AND created <= 2005-11-25 AND updated > 2009-01-01".

          Seriously folks, it's time to get rid of this technical debt.

          Show
          Gavin Bee added a comment - There are only 34 bugs that have recent updates AND were created in 2005 or earlier. Surely something can be done to ensure that these issues get higher weighting in the priority list. At this point, you are unlikely to get more votes on these issues because people now assume that confluence just can't handle anchors properly and avoid them. Personally, I am now in the habit of hardcoding the link to an anchor. This annoys me to no end because the DNS names of our confluence servers all changed recently. All of my anchor links are broken The query to find old bugs with recent activity is "project = CONF AND issuetype = Bug AND status in (Open, Reopened) AND created <= 2005-11-25 AND updated > 2009-01-01". Seriously folks, it's time to get rid of this technical debt.
          Hide
          Gili added a comment -

          The official documentation for anchors – http://confluence.atlassian.com/display/DOC/Working+with+Anchors – contradicts the actual software behavior.

          Show
          Gili added a comment - The official documentation for anchors – http://confluence.atlassian.com/display/DOC/Working+with+Anchors – contradicts the actual software behavior.
          Hide
          Gili added a comment -

          You should fix this sooner rather than later because in the meantime people are forced to create thousands of links to anchors that will be changing in the future. Please save us a lot of headache and fix this as soon as possible.

          Show
          Gili added a comment - You should fix this sooner rather than later because in the meantime people are forced to create thousands of links to anchors that will be changing in the future. Please save us a lot of headache and fix this as soon as possible.
          Hide
          Ken Duoba added a comment -

          I agree. This is such basic (core) functionality. Five years is too long...

          Show
          Ken Duoba added a comment - I agree. This is such basic (core) functionality. Five years is too long...
          Hide
          Lenny Wolf added a comment -

          I would also be very pleased, if this whould be fixed soon !

          Show
          Lenny Wolf added a comment - I would also be very pleased, if this whould be fixed soon !
          Hide
          Ryan Anderson [Atlassian] added a comment -

          +1 here. As stated previously, this is a necessary feature for including pages and linking documentation.

          Show
          Ryan Anderson [Atlassian] added a comment - +1 here. As stated previously, this is a necessary feature for including pages and linking documentation.
          Hide
          Chris Hadley added a comment -

          It is pointless to try to create useful documentation in Confluence if the anchor links do not work as designed. Please fix this.

          Show
          Chris Hadley added a comment - It is pointless to try to create useful documentation in Confluence if the anchor links do not work as designed. Please fix this.
          Hide
          Patrick Callahan added a comment -

          what they said...

          Show
          Patrick Callahan added a comment - what they said...
          Hide
          Chris Hadley added a comment -

          Hi folks. I don't know if this is why this ticket is being ignored, but I found in a forum somewhere that this is the problem: https://plugins.atlassian.com/plugin/details/281

          Something with an old iPhone plugin. We downloaded v0.0.9 and the anchor link situation is fixed.

          Show
          Chris Hadley added a comment - Hi folks. I don't know if this is why this ticket is being ignored, but I found in a forum somewhere that this is the problem: https://plugins.atlassian.com/plugin/details/281 Something with an old iPhone plugin. We downloaded v0.0.9 and the anchor link situation is fixed.
          Hide
          Quinn Taylor added a comment -

          That's strange, since this bug was reported in August 2005, and the iPhone wasn't around until 2007... I think there must be deeper issues at play.

          Show
          Quinn Taylor added a comment - That's strange, since this bug was reported in August 2005, and the iPhone wasn't around until 2007... I think there must be deeper issues at play.
          Hide
          Lenny Wolf added a comment -

          I can assure you guys, that it's because of the iphone plugin. I even contacted the developer of the plugin and he confirmed that there is an issue with his plugin. We then uninstalled (deactivated) the plugin and since then anchors work just fine.

          I agree that it's strange Quinn Taylor, but I've spent so much time with this little bugger, that I don't want to investigate further, why it was already reported in 2005 and so on...

          cheers

          Show
          Lenny Wolf added a comment - I can assure you guys, that it's because of the iphone plugin. I even contacted the developer of the plugin and he confirmed that there is an issue with his plugin. We then uninstalled (deactivated) the plugin and since then anchors work just fine. I agree that it's strange Quinn Taylor, but I've spent so much time with this little bugger, that I don't want to investigate further, why it was already reported in 2005 and so on... cheers
          Hide
          Matt Ryall [Atlassian] added a comment -

          I do this all the time, so I don't think it's broken in the current version of Confluence.

          As mentioned by Guy Fraser right at the top, the correct wiki link syntax just uses the value of the anchor tag or the exact name of the heading, not the actual 'name' attribute value in the rendered content. Our wiki renderer is smart enough to convert [Page#anchor] into <a href="/confluence/display/Page#Page-anchor"> automatically.

          If the {include} or {excerpt-include} macros are not rendering anchors properly, we can look at that as a separate issue.

          Show
          Matt Ryall [Atlassian] added a comment - I do this all the time, so I don't think it's broken in the current version of Confluence. As mentioned by Guy Fraser right at the top, the correct wiki link syntax just uses the value of the anchor tag or the exact name of the heading, not the actual 'name' attribute value in the rendered content. Our wiki renderer is smart enough to convert [Page#anchor] into <a href="/confluence/display/Page#Page-anchor"> automatically. If the {include} or {excerpt-include} macros are not rendering anchors properly, we can look at that as a separate issue.
          Hide
          Matt Ryall [Atlassian] added a comment -

          Sorry, it looks like most of the comments and votes here are actually about the

          {include}

          macro, and we have a bunch of duplicate issues resolved against this one.

          I'll reopen it and rename the issue so it makes more sense.

          Show
          Matt Ryall [Atlassian] added a comment - Sorry, it looks like most of the comments and votes here are actually about the {include} macro, and we have a bunch of duplicate issues resolved against this one. I'll reopen it and rename the issue so it makes more sense.
          Hide
          Matt Ryall [Atlassian] added a comment -

          This affects the table of contents macro as well. Recently reported as CONF-21713.

          Show
          Matt Ryall [Atlassian] added a comment - This affects the table of contents macro as well. Recently reported as CONF-21713 .
          Hide
          Kendziorra added a comment -

          In an old version there was an wrong implemented undocumented parameter absoluteUrl=true (for TOC).
          see here: https://studio.plugins.atlassian.com/browse/TOC-42 On this site are a patch for the wrong implementation.

          May be this param (absoluteUrl=true) is a way to solve this problem. If someone want to use an anchor link included in an other site, he have to set this parameter ???
          But needed to implemented !? It's only an idea.

          Show
          Kendziorra added a comment - In an old version there was an wrong implemented undocumented parameter absoluteUrl=true (for TOC). see here: https://studio.plugins.atlassian.com/browse/TOC-42 On this site are a patch for the wrong implementation. May be this param (absoluteUrl=true) is a way to solve this problem. If someone want to use an anchor link included in an other site, he have to set this parameter ??? But needed to implemented !? It's only an idea.
          Hide
          Paul Curren [Atlassian] added a comment -

          Anchor generation in Confluence 4.0 no longer has this problem.
          Confirmed fixed for both the include and toc macro cases described here.

          Show
          Paul Curren [Atlassian] added a comment - Anchor generation in Confluence 4.0 no longer has this problem. Confirmed fixed for both the include and toc macro cases described here.
          Hide
          Kendziorra added a comment -

          Should it work?
          I've got a testaccount with confluence on demand, but there is no change?
          I tried to add a

          {toc}

          to an

          {excerpt}

          and to include this in an other page

          Show
          Kendziorra added a comment - Should it work? I've got a testaccount with confluence on demand, but there is no change? I tried to add a {toc} to an {excerpt} and to include this in an other page
          Hide
          Paul Curren [Atlassian] added a comment -

          Kendziorra. As you have found, that particular case does not work very well although it is a different issue from this one.

          An issue already exists in the TOC project although I have added a comment just to clarify your problem case.

          Show
          Paul Curren [Atlassian] added a comment - Kendziorra. As you have found, that particular case does not work very well although it is a different issue from this one. An issue already exists in the TOC project although I have added a comment just to clarify your problem case.

            People

            • Votes:
              18 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Last commented:
                2 years, 18 weeks, 3 days ago