Copied document code from one page to another. All the links got broken

The Quality Manual was on my DRAFTS page. After it was approved, I edited as Wiki and copied the content to another page that already existed called Manual da Qualidade.

To my surprise, about 50 links became broken. Editing in the WYSIWYG editor, I click to edit the links, it sees the pages, I just press enter, the link is fixed!

click to edit link
image

just click ok

link is fixed
image

and link works!

BUT IF I SAVE the page, the link is broken again! It makes no sense.

If I edit in Wiki, these are the codes
[[ABNT NBR ISO 9001:2015 – Sistemas de Gestão da Qualidade – Requisitos>>Documentos Externos.DE-ADM-020.WebHome]];
[[ABNT NBR ISO 9000:2015 – Sistemas de Gestão da Qualidade – Fundamentos e vocabulário>>doc:Documentos Externos.DE-ADM-019.WebHome]];
[[PBQP-H – Referencial Normativo Nível “A” do SiAC / 2021>>doc:Documentos Externos.DE-ADM-018.WebHome]].

Notice the first link doesn´t have “doc:”. Thats because I edited it in the WYSIWYG editor and instead of just clicking ok, I COPIED the linked page reference, just posted on the search again, and selected. Apparently no difference from just clicking ok, but it resulted in the “doc:” disappearing from the link and now THAT link works.

And I tested it with other links. If I edit on Wiki mode and remove the “doc:” it works.

So yes, I can fix it by going into Wiki Edit Mode and searching all “doc:” and deleting from the code… but it doesn´t make much sense in my head and I would like to understand why this happens.

So you did a copy/paste of content it seems. It’s thus normal that you can have broken links. A cope paste will NOT refactor links. So if you have relative links for example, they might be broken.

It’s not mandatory to have “docs:” as a link prefix. See https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiSyntax/?syntax=2.1&section=Links

Check the part that starts with:

Untyped : If none of the above-mentioned resource types are specified (i.e. no type: resource prefix was specified in the link), then the link will be treated as a link to an XWiki terminal or non-terminal page using the following algorithm:

That doesn’t make sense to me either. Maybe provide the link of the broken links to help see what’s wrong?

Thx

So you did a copy/paste of content it seems. It’s thus normal that you can have broken links. A cope paste will NOT refactor links. So if you have relative links for example, they might be broken.

Yes, but I copied the code in Wiki mode. I am probably missing something here. But when creating a link in Wiki mode, you edit the link code yourself, so in theory there is “nothing behind” right?

So, if I write this link inside a page like home>pagetest, why wouldn´t the SAME link code work from a page at home>rascunhos>pagetest?
[[ABNT NBR ISO 9000:2015 – Sistemas de Gestão da Qualidade – Fundamentos e vocabulário>>doc:Documentos Externos.DE-ADM-019.WebHome]]

That doesn’t make sense to me either. Maybe provide the link of the broken links to help see what’s wrong?

I posted them above
[[ABNT NBR ISO 9000:2015 – Sistemas de Gestão da Qualidade – Fundamentos e vocabulário>>doc:Documentos Externos.DE-ADM-019.WebHome]];
[[PBQP-H – Referencial Normativo Nível “A” do SiAC / 2021>>doc:Documentos Externos.DE-ADM-018.WebHome]]

So I guess you are asking for the real URL?

This link is an absolute link so you can copy it and it’ll still work (if copied in the same wiki of course). What I said was:

So if you have relative links for example, they might be broken.

This doesn’t apply if you don’t use relative links ofc.

Yes, when you hover over the broken link, what URL is displayed in your browser?

Thx

No… in home>Manual da Qualidade, the link:

[[ABNT NBR ISO 9000:2015 – Sistemas de Gestão da Qualidade – Fundamentos e vocabulário>>doc:Documentos Externos.DE-ADM-019.WebHome]]

points to

image

in home>rascunhos>Manual da Qualidade

the link
[[ABNT NBR ISO 9000:2015 – Sistemas de Gestão da Qualidade – Fundamentos e vocabulário>>doc:Documentos Externos.DE-ADM-019.WebHome]]

points to the URL
image

it’s the same link as far as I can see. But the URLs point to different places. And as I said before, if I edit the link in WYSIWYG, and just press enter, the link FIXES and WORKS until I save the page.

What I mean is that while in editing mode, the missing link icon disappears, and from the editing window I can follow the link and it’s working.

edit: sorry, it seems the GIFs I recorded can´t be shown from my IMGUR account, and Youtube says they are the wrong format…
edit2: was able to save the second gif as a video and uploaded it to Youtube.

https://imgur.com/cpoJXp5

a gif animation showing the link being edited, WORKING, and then when saving or even when pre-viewing, it doesn´t work again.

this other video is a bit longer because I made some tests to show the links, but I noticed that the links do not appear while on WYSIWYG mode.

But anyway, I show that when editing the link, copying the link name and re-selecting the page, instead of just pressing enter, the behavior seem the same, but when I SAVE the page, this time the link is fixed

image

and in Wiki mode, the difference is that the “doc:” was removed from the code

I posted answers above and forgot to quote you, so you weren´t alerted to them

I am getting scared. Now I am having a similar problem in a page that was NOT copied or anything.

The top menu page.

Created a link to page Gestão de Riscos (Risk Management)

it works in the preview and all… when I save or save and visualize, it lost the link and instead of showing the link to the page, the link is changed to the edit link (as if the page did not exist)

@rogerpenna,
Did you identify any changes in the document history caused by the Edit Link operation?

Didn´t check it at the time. I know the version were created most likely. Because when I went to history, there were some 10 minor edits. I deleted all of them to return to version 1.1, since those minor edits were not really “changes”, but tests to the page.