Can't get link to heading to work

I'm trying to link to a heading on another page, but the link only takes me to the top of the page.

I created the link in the Advanced tab of the link edit dialog. I typed the link as follows:

Page Title#DesiredHeading

Spaces in the heading, none in the title.

When I link to the page, the link displayed in the address bar of my browser looks like this:

.../Page+Title#PageTitle-DesiredHeading

This is exactly the same link displayed by the Table of Contents macro for the same heading.

But it doesn't link down into the page, it only links to the top of the page. I have to use the TOC link or page down to the desired link.

What am I missing ?

Thanks

Tom

2 answers

1 accepted

Looks like this is a bug in Confluence. Fails in multiple browsers.

Workaround is to use explicit anchors instead.

0 vote
Peter Koczan Atlassian Team Dec 05, 2012

Hi,

Please check this page on linking to anchors, this may help you to find out what should be done in a different way: https://confluence.atlassian.com/display/DOC/Working+with+Anchors

Cheers,

Peter

That's what I did. Under 'Linking to a Heading', it said to enter pagename#headingname, no spaces in headingname. So I did that. But it doesn't seem to work.

Looks like I could create an anchor, instead of using the heading. But it does say that using the heading will work. Not sure what I've done wrong there.

Peter Koczan Atlassian Team Dec 05, 2012

hi, I noticed that when using headings the page name is also appended in the heading. are you sure that the link generated with linking to the heading is exactly the same as the one in the TOC? can you copy here both of them separately?

Peter Koczan Atlassian Team Dec 05, 2012

Indeed it is weird. Since simply entering the two links in the browser should navigate you to the same place (since they are identical).

Can you try emptying browser cache or even better: try a completely different browser. Also be sure to try copy-paste the link from each source (TOC and link) and see how they act. I believe this might be a browser issue if the links are identical

Here's the link from the address bar for the link I created:

.../RAPID+SOC+Environment#RAPIDSOCEnvironment-RAPIDEnvironmentSetup

And here's the link when I click on the TOC in the target page

.../RAPID+SOC+Environment#RAPIDSOCEnvironment-RAPIDEnvironmentSetup

The leading path is also identical.

When I created the link, I typed:

RAPID SOC Environment#RAPIDEnvironmentSetup

Seems kinda weird...

I did try an explicit anchor. That seems to work OK.

Well, doesn't work in Chrome or IE. Cleared cache and restarted browser. No effect.

But then I saved off the link created by the TOC, and when I selected that, it only went to the top of the page as well. So somehow the reference to the internal heading is only working when selected directly from the TOC.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Asked May 24, 2018 in Confluence

What are the resources that you use to learn more about Atlassian Products?

I am gathering information about resources available for Atlassian product knowledge transferring for a presentation in our local Atlassian User Group. I want to group them in four categories From ...

611 views 18 16
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you