Anchors are opening edit mode
Asked by Barbara Shannon:

I have previously defined anchors that were working fine. Now, when I click on one of those anchors, the page is opening in edit mode. Why? I changed nothing. How do I get this to stop?


Answers:
author: Sri Krishna Devaraya Vuyyuru
body: I have a hundred pages (all written by me) on our confluence. Yesterday, I was browsing thru some of the old pages and found that not even one link is working in them. Every time I click a link (that's supposed to take me to a heading on the same page), the page opens in Edit mode or doesn't respond at all. (I'm absolutely sure, I've tested every such link when I wrote those documents originally and ensured they are working, before I published them). Now, when I open them in edit mode, I notice, the links (on their own) have become *Page Name#MyHeading* (the same page name is inserted before the #). Originally they were just *#MyHeading* . Its just astonishing how they became *Page Name#MyHeading* .  
And now, when I try to fix the links by removing the Page Name part, only some such links work, not all.  
Do you have any solution to fix all those hundred pages?  
Or is this a sneaky way Atlassian has introduced this bug to force ppl to move to new editor???


author: Diego
body: Hello there!

As I understand,++*links that were created in the past are now seemingly broken and redirect users to edit mode of the pages.*++ With this in mind, I tried to replicate it but was ultimately unable to.

I created two types of links. Anchors to headings and links that go directly into edit mode. Only the links that lead me directly into edit mode did so. ++*Here is how each link looked like:*++

**Edit mode:**

<https://myinstance.atlassian.net/wiki/spaces/GP/pages/edit-v2/333333333>

**Anchor (View Mode):**

<https://myinstance.atlassian.net/wiki/spaces/GP/pages/333333333/PARENT-00#HEADING-ONE>

I tried to replicate this issue with both Chrome and Firefox. Here are their versions:
> * *Chrome 79.0.3945.88 64-bit*
> * *Firefox 71.0 64-bit*

Having said this, I believe that we have a clear path for testing. Here we go:
> 1. *Check if this happens regardless of browser*
> 2. *Test if this happens in all pages that contain anchors to headings*
> 3. *Check if newly created links behave the same*
> 4. *Could you share with us what your links look like?*

> ***Important Note! Be careful not to disclose any important and/or sensitive information in your links. Things like site name, page name and id can be replaced by placeholders! Here in community, everything is open to everyone!***

For further clarification on the anchor aspect of the situation, I would like to make it clear that this feature is not present in the new editor. For more details on the anchor and anchor macro behavior in the new editor, you can take a look here:
> 1. ++**[\[Confluence Cloud\] Anchor Macro](https://confluence.atlassian.com/confcloud/anchor-macro-724765159.html)**++
> 2. ++**[\[Confluence Cloud\] Insert Links and Anchors](https://confluence.atlassian.com/confcloud/insert-links-and-anchors-724764900.html)**++

Also, ++*I would like to understand if there was any kind of change applied to your instance prior to this issue.*++

Let us hear from you, [@Barbara Shannon](/t5/user/viewprofilepage/user-id/3632470) ! Looking forward to your reply.

comments: author: Barbara Shannon
body: In the product, I defined the anchor as TOC, and my link as #TOC (because it's an intra-page link, think "return to top").

Here is what the link text looked like when I hovered over the published page:

https://*myurl/* wiki/pages/resumedraft.action?draftId=*nnn* #*MyPage*-TOC

My anchor being named TOC is what I believe caused the problem.

I changed my anchor name from TOC to *My*TOC, and it again behaves as expected.


author: Diego
body: Thanks for sharing your current status with us, Barbara. Glad to know everything is working as expected.


author: Nadine Racine
body: Hi [@Barbara Shannon](/t5/user/viewprofilepage/user-id/3632470)

Thanks for sharing your workaround. This helped me.


author: sluecke
body: So, it looks like it has nothing to do with the actual name.

For me, my anchor was topOfPage. I tried various combinations of editing and found this to be the workaround.

You do not need to change the anchor name. If you do, that will force you to execute the "real" fix.

The real fix is to edit each link to the anchor. You don't have to change anything about the link. Just hit edit. Press Save button. Done.


Tags: confluence-cloud