Bug 44931 - EDITING, FILEOPEN: cross-referencing HEADINGS in a sub-document from master-document fails
Summary: EDITING, FILEOPEN: cross-referencing HEADINGS in a sub-document from master-d...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.5 release
Hardware: x86-64 (AMD64) All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 124401 (view as bug list)
Depends on:
Blocks: Writer-Master-Doc Fields-Cross-Reference
  Show dependency treegraph
 
Reported: 2012-01-19 02:27 UTC by gui
Modified: 2023-04-23 15:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
MASTER and SUB-docs with failing cross-references (24.06 KB, application/x-zip)
2012-01-19 02:27 UTC, gui
Details
Repaired MASTER and SUB-document with functionall cross-references (29.34 KB, application/x-zip)
2012-01-19 02:29 UTC, gui
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gui 2012-01-19 02:27:24 UTC
Created attachment 55768 [details]
MASTER and SUB-docs with failing cross-references

but only if HEADINGS in the sub-document ARE NOT local cross-referenced from itself...
Or, in other words, if you write a sub-document in wich you make cross-references to some of its headins, you will then cross-reference this headins from a master document in wich you have inserted the sub-doc; the rest of the headings will look OK when you insert the cross-reference, but doing a "Tools/Update/Update All" will convert all cross-references in a "Error: Reference source not found" message.
Here you are a demo of a master and sub document with failing cross-references...
Comment 1 gui 2012-01-19 02:29:53 UTC
Created attachment 55769 [details]
Repaired MASTER and SUB-document with functionall cross-references

To cross-reference the sub-document HEADINGS from the master-document, first you should cross-reference them from the same sub-document
Comment 2 Owen Genat (retired) 2014-02-09 11:37:57 UTC
I think this is merely a clearer description of the workaround indicated in comment 1 (although I am not certain). Added for clarity, in any case:

1. In the sub-document, at the required location (or highlighting the required range), Insert > Cross-reference... > Cross-references tab > Type of "Set reference" / "Bookmarks" > enter a meaningful Name > click Insert.

2. In the master document, Insert > Cross-reference... > Cross-references tab > Type of "Insert reference" / "Bookmarks" > select the required mark > click Insert.

It may be that the current problem highlighted by this bug is actually a limitation of ODF. The ODF v1.2 specification is not very clear about how inter-document citations (of headings, bookmarks, or reference mark) are to be treated.
Comment 3 Owen Genat (retired) 2014-02-09 12:00:17 UTC
I forgot to mention that the provided examples still fail under:

- Debian 7.3.0 x86_64 using v4.1.4.2 Build ID: 0a0440ccc0227ad9829de5f46be37cfb6edcf72 
- Crunchbang 11 x86_64 using
v4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71

OS set to All. The Writer Guide v4.0, Ch. 13, pp. 377-380, does however mention that this type of cross-reference between documents requires a reference mark to be set at the anchor point, so it may even be that this particular case is not a bug.
Comment 4 Joel Madero 2015-05-02 15:42:38 UTC Comment hidden (obsolete)
Comment 5 gui 2016-01-05 18:31:05 UTC
BUG confirmed as described in Comment 1 in version 4.4.7.2 over WinXP SP3; I'll check other versions and OS asap.
If, as Owen says in Comment 2 and 3, it's supposed to be an expected behaviour, I would like to recommend to enhance it to make HEADINGS levels in sub-docs referable from master-docs.
Attachments still reproduce precisely the bug.
Comment 6 QA Administrators 2017-03-06 14:13:03 UTC Comment hidden (obsolete)
Comment 7 gui 2017-04-17 23:47:57 UTC
I can confirm it in version 5.3 (I'll check the subversion asap) trying to reference sub-docs headings from containing master-document.
Comment 8 QA Administrators 2018-05-13 02:30:45 UTC Comment hidden (obsolete)
Comment 9 Dieter 2019-05-20 11:14:10 UTC
*** Bug 124401 has been marked as a duplicate of this bug. ***
Comment 10 Dieter 2019-05-20 11:16:45 UTC
It's still reproducible for me with

Version: 6.3.0.0.alpha1+ (x64)
Build ID: e92dcfdc7bd7b237e0bee26ff226a102d9e8e766
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-05-14_00:00:57
Locale: en-US (de_DE); UI-Language: en-US
Calc: threaded

and test documents from bug 124401
Comment 11 Dieter 2021-04-09 07:07:35 UTC
Still present in

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: f96004096268f5e71120678e32fc8c74055819aa
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Steps to reproduce
1. Open master document from attachment 5578 (and update links to other documents)
2. Edit the field "Error: Reference source not found" and add the correct cross reference to it (is is already selected in the "Edit Fields" dialog). => Cross Reference is displayed and works correctly
3. Tools => Update => Update All

Result: Field changes again to "Error: Reference source not found"
Comment 12 QA Administrators 2023-04-13 03:23:49 UTC Comment hidden (obsolete)
Comment 13 Dieter 2023-04-23 15:19:47 UTC
No error message anymore when opening master from attachment 55769 [details].
=> RESOLVED WORKSFORME