link to the anchor error

fineart fineart November 2, 2020

The Link has problem when it comes to link to the anchor on the same page.

1. Newly added Link cannot link to the anchor on the same page, but can link to the anchor on other page.

2. I click on a Link which used to link to the right position where the anchor was placed on the same page, but now it goes nowhere.

 

Server OS:Server 2019
Confluence :7.8.1

 

Edit Anchor.pngEdit Link.pngLink url.png

2 answers

1 accepted

0 votes
Answer accepted
Andrii Maliuta
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.
November 3, 2020

Hello @fineart fineart .

Adding Anchor with anchor1 id and linking to it as you showed above works.

Could you please show how the Anchor macros and where is added on the same page?

What formatting does the text have next to the Anchor macro?

Thank you

Marco Hölzemer November 3, 2020

Hi Andrii,

I think we have the following problem here: Since the new version 7.8.1 the page name is placed before the anchor IDs.
So the anchor name points to "anchor1", but the ID name is "site1-anchor1".
Therefore no more anchors can be found.

Andrii Maliuta
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.
November 3, 2020

@Marco Hölzemer 

Thanks for the reply.

The link in the format ".../SpaceKey/PageTitle#PageTitle-ANCHOR_ID was even in 6.X.X Confluence versions, so it is added automatically on the page rendering level. I checked on 6.11.0 and the way @fineart fineart  described above works fine for anchors.

So the Page title is added automatically to the anchor links and behavior is pretty the same.

link.png

Thank you

Marco Hölzemer November 3, 2020

Thanks for the feedback! Maybe this feature has been around for a while, but when I set the link to the anchor, no spacekey/pagetitle info is added to the link. This info will be added to the anchor. That's why it can't work - the link won't find the anchor.

 

Link:

Link_Editor.jpg

Link_Sourcecode.jpg

 

Anchor:

Anchor-Macro.jpg

Anchor-Macro_Sourcecode.jpg

Andrii Maliuta
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.
November 3, 2020

@Marco Hölzemer 

Thank you for additional information.

For now, could not face the same behavior even switching to Deatsch for interface and Page/Anchor namings.

The general Anchors docs (https://confluence.atlassian.com/doc/anchors-139442.html) page gives some notes on symbols and special cases in the anchor and page names. Maybe some umlauts or slashes in names cause this.

Marco Hölzemer November 3, 2020

I'm sorry it doesn't work. I've tested it without special symbols and umlauts. Can I send you some logs our something you need to find the problem.

 

Here is the editor-source-code:

<p>
<ac:link ac:anchor="anker">
<ac:plain-text-link-body><![CDATA[1]]></ac:plain-text-link-body>
</ac:link>
</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
<p>6</p>
<p>7</p>
<p>8</p>
<p>9</p>
<p>10</p>
<p>11</p>
<p>12</p>
<p>13</p>
<p>14</p>
<p>
<ac:structured-macro ac:macro-id="82c2689e-1a6d-48ed-8904-d3b12f553f39" ac:name="anchor" ac:schema-version="1">
<ac:parameter ac:name="">anker</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>

 

And the final source-code:

<a href="#anker">1</a></p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p><span class="confluence-anchor-link conf-macro output-inline" id="TEST-anker" data-hasbody="false" data-macro-name="anchor"> </span></p>
fineart fineart November 3, 2020

Hi Andrii,

Thanks for the reply.

1.how the Anchor macros and where is added:
Click the + on the toolbar > select Other Macros > Click Anchor Marcro > Enter anchor name

2.What formatting does the text have next to the Anchor macro?
Paragraph

 

link and anchr.png

Andrii Maliuta
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.
November 5, 2020

@fineart fineart , @Marco Hölzemer ,

For now, from my side I cannot reproduce this.

Will try some more options and get back to you.

Sorry, that cannot help with it at the moment.

Marco Hölzemer November 5, 2020

Hi @fineart fineart @Andrii Maliuta ,

the problem is solved. Just install version 7.8.3:

https://jira.atlassian.com/browse/CONFSERVER-60444

KR, Marco

Like Andrii Maliuta likes this
fineart fineart November 5, 2020

@Marco Hölzemer 
Problem solved
Thank you

Like Andrii Maliuta likes this
0 votes
Damion D_Oyley December 30, 2021

If you are still having trouble check your anchor name. If it has spaces, the system will automatically put dashes in between.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.8.1
TAGS
AUG Leaders

Atlassian Community Events