Uploaded image for project: '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
          pasternak8 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
          pasternak8 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
          pcurren Paul Curren 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
          pcurren Paul Curren 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
          pasternak8 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
          pasternak8 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
          pcurren Paul Curren 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
          pcurren Paul Curren 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.
          Hide
          cgray3 Carla Gray added a comment -

          I'm using version 5.4.4 of Confluence, and I don't see how this is fixed. The issue discussed in "CONF-15098 excerpt-include doesn't correct links to anchor inside the excerpt" is not resolved.

          We are also using excerpt and excerpt include. On the original page, I insert a link to a specific heading on that page (Insert > Link > Advanced. In the link field, enter "#HeadingTitle"). Then, I use the excerpt include macro, and the link doesn't work. I've tried the following to fix it:

          • Inserted an anchor on original page. This will not work on the include page.
          • Inserted "#HeadingTitle." This will not work on the include page.
          • Inserted "Page Name#HeadingTitle." Confluence automatically strips out the current page name and saves it as just "#HeadingTitle." As a result, this does not work on the include page.
          Show
          cgray3 Carla Gray added a comment - I'm using version 5.4.4 of Confluence, and I don't see how this is fixed. The issue discussed in " CONF-15098 excerpt-include doesn't correct links to anchor inside the excerpt" is not resolved. We are also using excerpt and excerpt include. On the original page, I insert a link to a specific heading on that page (Insert > Link > Advanced. In the link field, enter "#HeadingTitle"). Then, I use the excerpt include macro, and the link doesn't work. I've tried the following to fix it: Inserted an anchor on original page. This will not work on the include page. Inserted "#HeadingTitle." This will not work on the include page. Inserted "Page Name#HeadingTitle." Confluence automatically strips out the current page name and saves it as just "#HeadingTitle." As a result, this does not work on the include page.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Last commented:
                1 year, 3 weeks, 2 days ago