Bug 155445 - Wrong XHTML Footnotes/Endnotes IDs
Summary: Wrong XHTML Footnotes/Endnotes IDs
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.3.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-23 07:41 UTC by JI
Modified: 2023-12-22 12:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Export DOCX -> XHTML duplicate Footnotes/Endnotes IDs (20.21 KB, application/gzip)
2023-05-23 07:41 UTC, JI
Details
footnote odt version (10.16 KB, application/vnd.oasis.opendocument.text)
2023-12-22 11:30 UTC, JI
Details
footnote docx version (5.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-12-22 11:31 UTC, JI
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JI 2023-05-23 07:41:36 UTC
Created attachment 187452 [details]
Export DOCX -> XHTML duplicate Footnotes/Endnotes IDs

When convert a docx file with footnotes/endnotes with filter  "html:XHTML Writer File:UTF8" the created xhtml file is wrong, it has duplicate IDs for footnote/endnote links. If convert a odt wtth the same content the created xhtml file is correct.

docx -> xhtml:
    <p class="P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn1" href="#body_ftn1">1</a></span>1111</p>
    <p class="P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn4" href="#body_ftn4">2</a></span>2222</p>
    <p class="P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn4" href="#body_ftn4">3</a></span>3333</p>


odt -> xhtml:
    <p class="P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn1" href="#body_ftn1">1</a></span>1111</p>
    <p class="P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn2" href="#body_ftn2">2</a></span>2222</p>
    <p class="P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn3" href="#body_ftn3">3</a></span>3333</p>
Comment 1 Julien Nabet 2023-05-23 07:49:01 UTC
On which Linux distrib are you?
Please give a try to LO 7.4.7 or brand new LO 7.5.3
Comment 2 JI 2023-05-23 07:52:29 UTC
lsb_release -d
Description:	Ubuntu 22.04.2 LTS

soffice --version
LibreOffice 7.3.7.2 30(Build:2)
Comment 3 QA Administrators 2023-05-24 03:15:11 UTC
[Automated Action] NeedInfo-To-Unconfirmed
Comment 4 Julien Nabet 2023-05-24 11:52:33 UTC
Ok could you give a try to a newer LO version by using https://launchpad.net/~libreoffice/+archive/ubuntu/ppa as repository ?
Comment 5 QA Administrators 2023-11-21 03:12:26 UTC
Dear JI,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INSUFFICIENTDATA
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.
 
Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-NeedInfo-Ping
Comment 6 QA Administrators 2023-12-22 03:13:30 UTC
Dear JI,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp
Comment 7 JI 2023-12-22 11:30:35 UTC
Created attachment 191566 [details]
footnote odt version
Comment 8 JI 2023-12-22 11:31:42 UTC
Created attachment 191567 [details]
footnote docx version
Comment 9 JI 2023-12-22 11:37:18 UTC
a) soffice.bin --version 
    LibreOffice 7.3.7.2 30(Build:2)

   uname -a
    Linux ji 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

   lsb_release -r
    Release: 22.04

b) soffice --convert-to "html:XHTML Writer File:UTF8" footnote.docx

   show result with: xmllint --format footnote.html

    <body dir="ltr" style="max-width:21.001cm;margin-top:2cm; margin-bottom:2cm; margin-left:2cm; margin-right:2cm; ">
     <div class="P2">First<span class="Footnote_20_anchor" title="Footnote: 1. Footnote"><a href="#ftn1" id="body_ftn1">1</a></span></div>
     <div class="P2">Second<span class="Footnote_20_anchor" title="Footnote: 2. Footnote"><a href="#ftn4" id="body_ftn4">2</a></span></div>
     <div class="P2">Third<span class="Footnote_20_anchor" title="Footnote: 3. Footnote"><a href="#ftn4" id="body_ftn4">3</a></span></div>
     <p class="P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn1" href="#body_ftn1">1</a></span>1. Footnote</p>
     <p class="P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn4" href="#body_ftn4">2</a></span>2. Footnote</p>
     <p class="P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn4" href="#body_ftn4">3</a></span>3. Footnote</p>
    </body>
 
  you can see footnote 2 and 3 has the same id, with is wrong.

  if you convert footnote.odt to xhtml it is fine.
Comment 10 Julien Nabet 2023-12-22 12:10:05 UTC
On pc Debian x86-64 with master sources updated today or with LO Debian testing package 7.6.4.1, I don't reproduce this.
I got:
     43 <!--Next 'div' was a 'text:p'.-->
     44 <div class="paragraph-P2">First<span class="Footnote_20_anchor" title="Footnote: 1. Footnote"><a href="#ftn1" id="body_ftn1">1</a></span></div>
     45 
     46 <!--Next 'div' was a 'text:p'.-->
     47 <div class="paragraph-P2">Second<span class="Footnote_20_anchor" title="Footnote: 2. Footnote"><a href="#ftn4" id="body_ftn4">2</a></span></div>
     48 
     49 <!--Next 'div' was a 'text:p'.-->
     50 <div class="paragraph-P2">Third<span class="Footnote_20_anchor" title="Footnote: 3. Footnote"><a href="#ftn5" id="body_ftn5">3</a></span></div>
     51 
     52 <p class="paragraph-P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn1" href="#body_ftn1">1</a></span>1. Footnote</p>
     53 
     54 <p class="paragraph-P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn4" href="#body_ftn4">2</a></span>2. Footnote</p>
     55 
     56 <p class="paragraph-P1"><span class="footnodeNumber"><a class="Footnote_20_Symbol" id="ftn5" href="#body_ftn5">3</a></span>3. Footnote</p>
     57 </body>


Could you give a try to LO 7.6.4 by using LO ppa? (see https://launchpad.net/~libreoffice/+archive/ubuntu/ppa)