Bug: Cross-reference changes if line-break added
Posted: Thu Aug 05, 2021 11:52 pm
Today I encountered a bug I have never seen before in LO. I am using six different documents for an essay, due to some unwanted file corruptions occuring previously. (Again, thank you so much for saving the contents.) I have all my translations at the end of my main body text file, and at the end of day, I copy this to my appendix file. As expected, all the cross-references in the original file are reported as missing, but this is all solved when they are all merged in the master document. However, something unusual happened when pasting the final cross-reference today: Instead of being changed to ‘Error: Could not find source of reference’ (translated from the Norwegian prompt), the final cross-reference (and only the final one) was changed to cross-reference a custom footnote in the new file (pointing to an asterisk).
Here is how the file is laid out:
I was able to reproduce the error (ɔ: not get it to go away) several times. The error was only present for the final paragraph, and not even reloading the file solved it. But then I by accident added a linebreak at the end of the final paragraph in the original document, and when pasting that the error disappeared, correctly referencing the missing footnote from the original file.
So here is how I did it:
Here is how the file is laid out:
- H1
- A series of body text paragraphs, most of which begin with a number 1–n
- To some of these, footnotes unique to this specific file, using the *, †, ‡, § system, starting anew for each page.
- A series of body text paragraphs, most of which begin with a number 1–n
I was able to reproduce the error (ɔ: not get it to go away) several times. The error was only present for the final paragraph, and not even reloading the file solved it. But then I by accident added a linebreak at the end of the final paragraph in the original document, and when pasting that the error disappeared, correctly referencing the missing footnote from the original file.
So here is how I did it:
- I finished writing the cross-referenced translations in the original file.
- I pasted the new lines into the appendix.
- The final paragraph changed the final cross-reference to point to an (assumed) random footnote in the new document, despite this being a symbol footnote, not a numerical footnote.
- After numerous retries at pasting both that single paragraph as well as that final paragraph and some of the paragraphs from above, I added a line-break at the end of the final paragraph in the original document.
- I pasted the paragraph(s) with the added linebreak after the final line, and the error disappeared
- I was able to repeat it a few times, but after saving I could not reproduce the error.