link to the anchor error
Asked by fineart fineart:

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.png](/t5/image/serverpage/image-id/116842iBDA0E42A150E269C/image-dimensions/576x246?v=v2 "Edit Anchor.png")![Edit Link.png](/t5/image/serverpage/image-id/116843i856EF442DE619C4D/image-dimensions/835x240?v=v2 "Edit Link.png")![Link url.png](/t5/image/serverpage/image-id/116844iC32E6E9AC6700C3B/image-dimensions/428x346?v=v2 "Link url.png")


Answers:
author: Andrii Maliuta
body: Hello [@fineart fineart](/t5/user/viewprofilepage/user-id/4139840) .

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

comments: author: Marco H?lzemer
body: 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.


author: Andrii Maliuta
body: [@Marco H?lzemer](/t5/user/viewprofilepage/user-id/517078)

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](/t5/user/viewprofilepage/user-id/4139840) 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](https://community.atlassian.com/t5/image/serverpage/image-id/116882i4F1296045FC6C1B7/image-size/large?v=v2&px=999 "link.png")

Thank you


author: Marco H?lzemer
body: 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](https://community.atlassian.com/t5/image/serverpage/image-id/116891i58298F8BF8E248B6/image-size/large?v=v2&px=999 "Link_Editor.jpg")

![Link_Sourcecode.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/116888i418B496004735F37/image-size/large?v=v2&px=999 "Link_Sourcecode.jpg")

**Anchor:**

![Anchor-Macro.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/116892i5DBC5933FFFA9270/image-size/large?v=v2&px=999 "Anchor-Macro.jpg")

![Anchor-Macro_Sourcecode.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/116893i126ECAFF2D37911D/image-size/large?v=v2&px=999 "Anchor-Macro_Sourcecode.jpg")


author: Andrii Maliuta
body: [@Marco H?lzemer](/t5/user/viewprofilepage/user-id/517078)

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.


author: Marco H?lzemer
body: 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="view-source:http://10.1.0.14/display/SBSeiten/TEST#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>
```


author: fineart fineart
body: 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](https://community.atlassian.com/t5/image/serverpage/image-id/116985iF2317BDFDA3B3241/image-size/large?v=v2&px=999 "link and anchr.png")


author: Andrii Maliuta
body: [@fineart fineart](/t5/user/viewprofilepage/user-id/4139840) , [@Marco H?lzemer](/t5/user/viewprofilepage/user-id/517078) ,

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.


author: Marco H?lzemer
body: Hi [@fineart fineart](/t5/user/viewprofilepage/user-id/4139840) [@Andrii Maliuta](/t5/user/viewprofilepage/user-id/484201) ,

the problem is solved. Just install version 7.8.3:

[https://jira.atlassian.com/browse/CONFSERVER-60444](https://jira.atlassian.com/browse/CONFSERVER-60444?error=login_required&error_description=Login+required&state=59b78795-baf4-4d27-ab02-9fd1810e1aa8)

KR, Marco


author: fineart fineart
body: [@Marco H?lzemer](/t5/user/viewprofilepage/user-id/517078)   
Problem solved  
Thank you


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


Tags: confluence-server

server