Bug 133266 - Duplicate bibliography number if entry added to footnote
Summary: Duplicate bibliography number if entry added to footnote
Status: RESOLVED DUPLICATE of bug 95285
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.7.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Bibliography
  Show dependency treegraph
 
Reported: 2020-05-22 08:18 UTC by Puma El Busta
Modified: 2022-05-29 14:36 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test document describing steps to reproduce and showing actual result. (11.63 KB, application/vnd.oasis.opendocument.text)
2020-05-25 15:11 UTC, Puma El Busta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Puma El Busta 2020-05-22 08:18:32 UTC
Bibliography entry in footnote seems to be handled separately from entries in the main text. 
If I add a bibliography entry to the end of a footnote, it gets numbered [1], regardless of I already have multiple entries.

Steps to reproduce:
1. create new document
2. add some text
3. insert at least one bibliography entry 
4. create a footnote
5. insert bibliography entry to the end of footnote
6. insert bibliography index

result: 
Bibliography
[1] This bibliography entry is from main text 1
[1] This bibliography entry is from footnote
[2] This bibliography entry is from main text 2
Comment 1 Dieter 2020-05-24 05:52:36 UTC
Thank you for reporting the bug. It seems you're using an old version of LibreOffice. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 2 Puma El Busta 2020-05-25 10:35:21 UTC
Reproduced also on Version: 6.4.4.2 (I don't find this version in the drop-down list)
It seems the index numbers are being messed up.

Steps to reproduce:
1) add some  text and create a footnote:

  Adding this text here
  and adding some more
  just to make it look like a document1
  and more and more text
  
  _________
  1 This is a footnote

2) insert 2 new bibliography entry:
  Adding this text here
  and adding some more[1]
  just to make it look like a document1
  and more and more text[2]

_________
This is a footnote


3) insert a new bibliography entry to the footnote (note that all 3 entries are different):
  Adding this text here
  and adding some more[1]
  just to make it look like a document1
  and more and more text[2]

_________
This is a footnote[2]

4) inserting a bibliography index shows the same, two references have the same index number:

  Bibliography
  1: me, first, 2020, http://whatever1
  2: me, third, in footnote, 2020, http://whatever3
  2: me, second in text body, 2020, http://whatever2

############
5) extra step: add a new line and insert all 3 existing entries in order by name: first, second, third

  Adding this text here
  and adding some more[1]
  just to make it look like a document1
  and more and more text[3]
  add a new line[1][3][2]

looks like the indexes got changed, but at least now the reference in the 4th line got updated to [3],
and updating the index table got sorted. This means we have a workaround, but this makes everything complicated-
I'd expect that indexes getting renumbered based on their position in the text, and per page in order body text first, then footnote.
Comment 3 Dieter 2020-05-25 11:38:14 UTC
Thanks for detailed steps. But I'm afraid, not everything is clear to me. So please attach a sample document and describe what there is to do after opening the documenbt to reproduce the bug.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it)
Comment 4 Puma El Busta 2020-05-25 15:11:04 UTC
Created attachment 161267 [details]
Test document describing steps to reproduce and showing actual result.

Attached Writer document showing the steps and results.
In the meantime I found a way to fix it manually (described in the attachment too), but still I think it's considered a bug as it should update index automatically. (updating only the index table doesn't fix it)
Comment 5 QA Administrators 2020-05-26 03:36:18 UTC Comment hidden (obsolete)
Comment 6 Dieter 2020-05-29 14:07:18 UTC
I confirm it with

Version: 6.4.4.2 (x64)
Build-ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU-Threads: 4; BS: Windows 10.0 Build 18363; UI-Render: GL; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded

I also confirm the workaround: Edit Index => O. K.

Perhaps duplicate of bug 47582 or bug 95285
Comment 7 Dieter 2022-05-29 14:36:19 UTC
Still present in

Version: 7.3.4.1 (x64) / LibreOffice Community
Build ID: 13668373362b52f6e3ebcaaecb031bd59a3ac66b
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

But don't think, that problem is related to footnote:
1. Open attachment 161267 [details]
2. Isert Bibliography Entry (Insert -> Table of Contens and Index -> Bibliography Enry) after first paragraph

Actual result
Entry [1] is doubbled

Expected result
Renumbering

And this is bug 95285 => RESOLVED DUPLUCATE

*** This bug has been marked as a duplicate of bug 95285 ***