Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

link to anchor doesn't work

Viewing page 2 of 2

34 answers

0 votes
Tatyana Kuznetsova July 27, 2018

@Steffen HellerIf I link to pagename-#section 1 then it works (and it also forced the reload of the page)

If I just link to #section 1 then it does not work.

0 votes
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 27, 2018

But YOU enter ONLY "#section 1" and then CONFLUENCE adds the pagename to it, making it "#mypage-section 1" and then the link DOES work? Is that correct?

I am just trying to find out if same page links do not work at all for you or if you are just confused by the fact that confluence internally adds the pagename to a link.

0 votes
Tatyana Kuznetsova July 26, 2018

I have a similar issue - whenever I try to create the same page anchor, the prefix containing the page name gets inserted automatically. So if a create an anchor ("section 1") using the anchor macro, in order to link to it, I need to say #mypage-section1 (where 'mypage' is the name of the page). 

This is not the behavior that I am looking for - I just want the same page anchor (that does require reloading of the page)

Please advise if this is a bug and if there is a workaroudn for this.

Thank you,

-Tanya

0 votes
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 22, 2018

@Doug Swartz

I don't know about "the same problem" (there might be something, who knows?) but what you describe, the fact that a prefix is added to the link, is correct behaviour.

It is correct because the same prefix is automatically added to the anchor. You can see it if you have a look at the source code.

0 votes
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2018

Can you paste the page source here? At least where the link was inserted and then the code around the anchor. Sometimes spurious tags can get pasted into a page.

 

You are clicking Insert Link and then the clicking the Advanced tab to insert the link?

0 votes
Doug Swartz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2018

@Derek Dokoto Did you ever get a resolution to this.  We are on Confluence 6.2.4 and have the same problem. following the instructions for placing links to anchors on the same page, the anchor gets generated into the link with a prefix. The prefix is the pagename with spaces removed. In other words, On a page named "This Page", with an anchor name "an1", here's what gets generated for an anchor URL:

https://myConfluence/display/mySpace/This+Page#ThisPagean1

 

Of course this doesn't work, because the anchor is really named an1, not ThisPagean1.

0 votes
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 24, 2017

I checked the latest version 6.3 => https://confluence.atlassian.com/doc/anchors-139442.html and the cloud version => https://confluence.atlassian.com/confcloud/anchors-724764900.html, the description is the same as mine.

Have to tried to follow the docu for your version?

0 votes
Derek Dokoto July 21, 2017

As stated, I'm running 5.10.8 which is different from yours.

Yes, the insertion and link to anchors is quite straightforward.   Only thing is that it doesn't work for me.  I'm used anchors in many CMS and/or twiki systems and it always worked for me in the past, just not in confluence. 

0 votes
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2017

No idea, if your version is different from mine.
I use version 4.3.7 (server) and adding anchors is pretty straightforward.

To enter the anchor:
* Insert > Other macros > Anchor
* Type "My Anchor" at "Anchor Name"

To link to the anchor:
* Highlight link text
* Insert Link > Adcanced
* Type "#My Anchor" at "Link"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events