Bug 58920 - VIEWING: "Error: Reference not found" should be replaced with reference-name
Summary: VIEWING: "Error: Reference not found" should be replaced with reference-name
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fields-Cross-Reference
  Show dependency treegraph
 
Reported: 2013-01-01 16:28 UTC by Robert Großkopf
Modified: 2019-05-09 12:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Two textdocuments, one with a reference to the other, works in globaldocument (21.90 KB, application/zip)
2013-11-22 19:32 UTC, Robert Großkopf
Details
Screenshots taken under different LO versions of master and sub-doc 2. (625.09 KB, application/zip)
2013-11-23 12:37 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2013-01-01 16:28:11 UTC
Writing a handbook for Base. There are many chapters. So I set references in one chapter to another for my global-document. But when I change to the single document, there appears an error: "Error: Reference not found" (German: "Fehler: Referenz nicht gefunden")
So I have to change the single-documents after I have created a *.odt-file from the global-document. Find all errors and replace them with the text of the reference - only without a reference.
Could be a good idea, if it could be changed to show only the reference-name. So single-documents must not be changed and don't have a reference at this position.
Comment 1 Owen Genat (retired) 2013-11-22 00:09:30 UTC
> So I set references in one chapter to another for my global-document.

Robert, could you provide an example of how the above cross-references are created? It is not clear what type (bookmark, set reference, user variable, etc.) of cross-reference is being used.

> But when I change to the single document, there appears an error: 
> "Error: Reference not found" (German: "Fehler: Referenz nicht gefunden")

Does this error still occur under the current version?
Comment 2 Robert Großkopf 2013-11-22 19:32:33 UTC
Created attachment 89654 [details]
Two textdocuments, one with a reference to the other, works in globaldocument

Open the GlobalDoc. You could see a reference with the Name "One" in the third line. Click on this reference. It is a working reference to the first line.
The first line is from Doc1, the other text is in Doc2.
Now open Doc2. There appears "Error: Reference not found".
It is the same behavior in all LO-versions, up to LO 4.2.0.0 alpha from 2013-11-20.
Comment 3 Owen Genat (retired) 2013-11-23 12:37:07 UTC
Created attachment 89678 [details]
Screenshots taken under different LO versions of master and sub-doc 2.

Thanks for providing the example file Robert. The cross-references do indeed appear to display an error, although to what degree this is a valid enhancement will need a developer / expert to look into.[1] I can understand how this particular use case might be seen as inappropriate for a cross-reference.[2] I am attaching screenshots taken under Ubuntu 10.04 x86_64 running these LO versions:

- v3.3.0.4 OOO330m19 Build: 6
- v3.4.6.2 OOO340m1 Build: 602
- v3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b
- v3.6.7.2 Build ID: e183d5b
- v4.0.6.2 Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24
- v4.1.3.2 Build ID: 70feb7d99726f064edab4605a8ab840c50ec57a

In each case I have opened the master document (File > Open > GlobalDoc.odm) and then opened the sub-document (Doc2.odt) via Navigator. In all cases the screenshots show the "Fehler: Referenz nicht gefunden" (English: "Error: Reference not found") message when the sub-document is opened, as you originally reported.

[1] Doc1.odt uses a ranged reference mark i.e., Insert > Cross-reference... > Cross-references tab > Set reference > Name of "One". XML for the anchor:

<text:p text:style-name="P1">
   Header 
   <text:reference-mark-start text:name="One"/>
      One
   <text:reference-mark-end text:name="One"/>
</text:p>

Doc2.odt uses a cross-reference to a known reference mark (manually entered, rather than selected as the link is between two separate documents)  i.e., Insert > Cross-reference... > Cross-references tab > Insert reference > Insert reference to "Reference" > Name of "One". XML for the source:

<text:p text:style-name="P1">
   Here is the reference: 
   <text:reference-ref text:reference-format="text" text:ref-name="One">Fehler: Referenz nicht gefunden</text:reference-ref>
</text:p>

[2] Usually a cross-reference is made within a single document. Master + sub-documents complicate this of course, with separate documents effectively merging to form a single document (which is why the link works fine in the master view). I am unclear to what degree a cross-reference rather than hyperlink (which is a more global link that also can use bookmark and reference mark anchors) is expected to be used in this type of situation.
Comment 4 Robinson Tryon (qubit) 2013-12-18 18:18:34 UTC
(In reply to comment #3)
> The cross-references do indeed
> appear to display an error, although to what degree this is a valid
> enhancement will need a developer / expert to look into.[1]

Per the above comment:
Whiteboard: NeedAdvice
Comment 5 Robinson Tryon (qubit) 2015-01-22 15:41:08 UTC
(In reply to Owen Genat from comment #3)
>...The cross-references do indeed
> appear to display an error, although to what degree this is a valid
> enhancement will need a developer / expert to look into.[1] I can understand
> how this particular use case might be seen as inappropriate for a
> cross-reference.[2]

Per devs, sounds like there's an opportunity for improvement here
Status -> NEW
Whiteboard -> (remove) needAdvice