Writer loses correct Cross Reference Page#'s

I am using Writer 7.1.4.2 and have a 100+ page document full of cross references by Headings.
If I cut and paste a section of the document to another location, it screws up a large number of the cross-references. The cross-reference page number still shows up in the document with the grey background, like “58”, but the heading is no longer on that page. If I hover the mouse over the page link, I don’t see the hint with the header. If I click on the link nothing happens.

Steps: I added the Cross-reference by selecting “Insert > Cross-Reference” and Selected Type: “Headings”, Insert reference to “Page” and Selection was the header text. This inserts the cross-reference just fine, and it works. But later on some of them will no longer work when they are clicked on.

I have over a hundred of these cross-references in the document and some of them no longer work.
How can I correct it? At the very least I’d like to be able to edit the cross-reference and redo it, but I don’t know what the name of the header was. Is there a way to recover the header that was used for the cross-reference?

I was going to publish this document tomorrow but it doesn’t look like that isn’t going to happen any time soon!

Edit your question to explain how you cross-referenced your headings (which field? Properties of the cross-ref?). A copy and paste usually keeps the initial properties and doesn’t change the hyperlink target.

Don’t use “Add Answer” which is reserved for solutions. Be kind enough to edit and make clear what you added.

Ok, I’ve added the steps.
I thought I had pressed “Add Question”. Is there a way for me to change it from an Answer to a Question? Or should I repost it?
TIA

You seem to have correctly edited the question.

The steps are apparently the right ones. Can you streamline your document to a 1- or 2-page sample still exhibiting the error? Attach it while editing the question (the “paperclip” tool is not available in a comment).

I forgot to ask THE elementary question: in which format do you save? .odt or .doc(x)?

I use cross references. I found life was much easier after I added the Update all icon to the standard toolbar.

ajlittoz,
I store the file in ODT format
because I thought that was safer. I still managed to shoot myself in the foot though. ROFL

After I finish my document and send it off, I will try and create a test document to see if I can replicate the cross-reference problem.

Earnest AI
I ran the Update All on the document and it unfortunately did nothing to correct the bad cross-references. I went through the document yesterday and found around 25% of the cross-references to be bad and I had to delete and re-enter them.

Good, saving .odt eliminates one very likely cause of the problem.

Waiting for a sample file if you can recreate the issue.

Click Tools > Update > Update all and references will update.

I added the icon to my toolbar by right-clicking on the Standard toolbar and selecting Customise. In the dialog that opens (be patient) select the Toolbars tab. On the right hand pane select the icon next to where you want the new icon to go, then on the left hand pane, scroll down to Update All and select the one that really does update all, then click the right-facing arrow between the panes.

Thanks for the detailed description. I will give it another try and have it ready in case the corrections to the cross-references fail again. It would be nice if I could just press a button and it repairs itself (bad cross-references)

It is not that the cross references have failed, it is that they have been manually moved by cut and paste.

The icon is also useful at the end when editing headings and levels as a quick way to return to the TOC

Earnest AI,
“It is not that the cross references have failed, it is that they have been manually moved by cut and paste.”

That’s correct. But since the cross reference was defined with the Selection set to “Header Text”, and the header is still in the document (just moved), then why can’t it reconnect to the header at its new position to display the correct page# in the cross-reference? That’s what has me puzzled. And why can’t I edit the cross reference page# (in grey) that appears in the text? I thought I should be able to edit it and it would pull up the cross-reference screen with the same values I used to define it. But the page# generated by the cross-reference is uneditable, or so it would appear.

You can manually edit the TOC and want to keep it that way, say for printing. LibreOffice does not know what you intend to do so it lets you do what you want without interference. Update is only a menu item away.