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

Copying page messes up links to anchors/headings

M_S_
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.
August 24, 2017

I have a page with a number of links that point to anchors (headings) within the same page. This is using the "#heading" syntax.

However, when I copy the page, all links are messed up, so that instead of refering to "#heading", they refer to "Copy of pageX#heading". Even more annoying, the link text is also updated. 

Is this a known defect or something that can be prevented somehow?

2 answers

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 24, 2017

@M_S_ I could not reproduce the issue on my Confluence 6.3.3 test instance so I created a support ticket for you so I can take a closer look. You should get an email from me shortly, asking for logs.

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 25, 2017

For anyone else experiencing this issue, similar behavior has been reported as a bug:

An anchor link's name changes after editing the page with Collaborative Editing switched on or set to limited

M.S. is going to turn off collaborative editing to see if that fixes the issue for his instance.

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 28, 2017

Turning off Collaborative editing eliminated the issue M.S. was experiencing with linking to anchors when copying or editing.

Collaborative editing can be set to Off mode at Confluence Admin>Collaborative Editing>Change mode.

Stephen Kairys February 22, 2018

@AnnWorley

Has this issue been logged as a bug in JIRA? We've just discovered we've been exposed to

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

and we're turning off Collaborative Editing b/c of it. We would like to turn it back on once 51690 is fixed. However, unless we're confident that this "copy" bug won't affect us, I'd be reluctant to turn it back on.

Thanks.

 

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 22, 2018

I understand you are concerned that links will break when copying pages with collaborative editing on. 

In response to this thread and the related support request I added a comment to the bug report to let the dev team know it is being reported on copies as well as simple edits: An anchor link's name changes after editing the page with Collaborative Editing switched on or set to limited

Stephen Kairys February 22, 2018

Oh, you mean your comment from last year?

I hope this bug can be fixed ASAP. If the page I'm currently editing broke, who knows what else broke? What's the best way to nudge your Dev team into fixing?

Thanks.

Like Exequiel Martini likes this
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 22, 2018

It's true that the comment is 6 months old. It makes sense that you would be frustrated at being hit by that and other collaborative editing bugs.

The criteria we use to choose which bugs to fix is documented in our Bug Fixing Policy. If you need a new bug report opened, please use our support portal to open a support request so the support engineer can reproduce the issue and open a new Jira issue.

Atlassian Support is eager and happy to help verify bugs—we take pride in it! Create an issue in our support system, providing as much information as you can about how to replicate the problem you're experiencing. We'll replicate the bug to verify, then lodge the report for you. We'll also try to construct workarounds if possible.

Stephen Kairys February 22, 2018

Thank you, Ann. Are you suggesting I open a new bug report for the COPY aspect of this issue? I have not seen evidence of it, but that does not mean there aren't corrupted pages out there I have yet to discover.

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 22, 2018

I wasn't really suggesting that, rather letting you know that support requests are the avenue to opening bug reports. That said, if you are able to reproduce it I am sure the team would be interested, as these bugs with links are hard to replicate.

p_borloz December 13, 2022

Hi, this Issue is almost 5 years old and it seemed not solved at all.

 

Is there a solution to avoid, that the link breaks up after copying the anchor?? Its quite frustrating!

Cary Burgett January 12, 2023

I hear you. 5 years. Tonight, I believe I found an indirect solution:

https://community.atlassian.com/t5/Confluence-questions/Space-copy-How-to-keep-the-same-link-format-of-the-source/qaq-p/1928795

This person said to use 'anchors'. I have now replaced my links with anchors and it works well...basically has a very similar result...but not exactly like a link.

This may be why Atlassian has not fixed this 'bug'...because the anchor strategy is what should be used for a page that will be copied multiple times.

Cary

(first post by the way!)

Dasa Orsaghova May 4, 2023

@Cary Burgett   Have you tried copying the Anchor within the same page?

I mean literally multiplying it. Did not work for me.. not sure whether it is some admin configuration or it is an issue in Confluence.

Thanks!

Dasa

Like Viktor Levadnyi likes this
0 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2017

Hi,

I don't think that this is a defect. If I copy a page with "self-referencing" links, I would expect that these self-referencing links keep their self reference. They should link to the same page where they are included and so they also do that on the copy. 

M_S_
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.
August 24, 2017

Not sure if you agree or disagree with my statement. 

I did more testing and am fully confused. 

The source page has 

<ac:link ac:anchor="Introduction" />

(where introduction is a heading on the same page). This shows as

Introduction

When I copy the page it shows as

Copy of PageX#Introduction

However, when I then edit the copied page the copied page goes back to normal (markup and display) - even without applying any actual edits.

I would consider this to be an error.

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2017

I don't understand the problem, to be honest. My original test page looks like this:

<h1>test</h1>
...
<p><ac:link ac:anchor="test" /></p>

If I copy the page and look at the storage format, it looks exactly the same.

If I look at the target of the link on the original page, it refers to:

http://<confluence-url>/display/SPW/links+anchor+links#linksanchorlinks-test

and the copy:

http://<confluence-url>/display/SPW/Kopie+von+links+anchor+links#Kopievonlinksanchorlinks-test

  

Robert Reiner _smartics_
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.
August 24, 2017

If I understand Working with Links correctly, it seems to me that

page#anchor

is the implied form of

#anchor

iff  'page' is the current page.

So it may be considered an issue to not fully normalize the link, although the rendered result is - as Thomas has shown - identical.

I suppose M.S. encounters an actual problem for a use case due to Confluence not 'normalizing' the links on the copied page fully. Maybe this could provide some more context for this question and therefore we could understand why this should be considered an error?

M_S_
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.
August 24, 2017

If I copy the page and look at the storage format, it looks exactly the same.

It does not for me. The storage format as well as the link text that is displayed changes.

See how it adds a <ri:content-entity ...> during the copy and that disappears when "editing":

page copy issue.png

M_S_
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.
August 24, 2017

Confluence 6.0.1 by the way.

Robert Reiner _smartics_
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.
August 24, 2017

Ok, the case you show is a bug in my opinion.

On Confluence 6.1.3 I cannot reproduce the problem. Maybe this is a bug already fixed?

M_S_
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.
August 24, 2017

I will consider updating to 6.3.x. Hopefully the issue goes away.

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2017

Thank you for the detailed information, now I understand your problem. 

I hope, this will be gone after updating, good luck!

M_S_
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.
August 24, 2017

I did a quick update to Confluence 6.3.3.

There problem is still there...

How can attention from Atlassian be pointed to this?

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2017

You can open a support case here: 

https://support.atlassian.com/contact/#/

M_S_
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.
August 24, 2017

I am on Starter License, so it points me back to the forums :-(

Robert Reiner _smartics_
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.
August 24, 2017

I just checked with a 6.3.3 and I cannot reproduce the problem.image.png

I created a page with a local link, copied it and the label of the link does not contain the anchor.

I downloaded the WAR with the Atlassian SDK and started the Confluence Server locally.

Puzzling ...

EDIT: Synchrony is off in this test environment.

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2017

Hi @AnnWorley,

are you able to help her / him (don't know what "M.S." stands for) ?  

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 24, 2017

Yes, @Thomas Schlegel I am investigating. Thanks for the heads up.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events