Bug 135794 - A comment in textbox is allowed in docx; causing a sax parse exception on save and reload
Summary: A comment in textbox is allowed in docx; causing a sax parse exception on sav...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:7.5.0
Keywords: bibisected, bisected
: 143435 (view as bug list)
Depends on:
Blocks: Textbox DOCX-Comments
  Show dependency treegraph
 
Reported: 2020-08-16 08:40 UTC by Telesto
Modified: 2022-07-19 17:33 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example file (8.52 KB, application/vnd.oasis.opendocument.text)
2020-08-16 08:40 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-08-16 08:40:15 UTC
Description:
A comment in textbox is allowed in docx; causing a sax parse exception on save and reload

Steps to Reproduce:
1. Open the attached file
2. Place the cursor inside they textbox 
3. Insert -> comment (disabled)
4. File save as docx
5. file reload
6. Insert -> comment -> type something in the comment
7. Save 
8. File reload -> Sax parse

Actual Results:
Comment in textbox allowed in docx
saxparse exception on file reload with a commenr

Expected Results:
ideally comment in textbox allowed? It looks like it's not properly implemented


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.2
Build ID: c01aa64b6c3d89ebe5fe69c28c7adb24eb85249c
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 1 Telesto 2020-08-16 08:40:54 UTC
Created attachment 164342 [details]
Example file
Comment 2 Telesto 2020-08-16 09:39:53 UTC
No issue with
Version: 6.2.0.0.alpha0+
Build ID: 401cba4c20fbc930f034168872642428d7459218
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: nl-NL (nl_NL); Calc: CL
Comment 3 Telesto 2020-08-16 12:49:44 UTC Comment hidden (obsolete)
Comment 4 BogdanB 2020-08-16 13:08:50 UTC
No error, but I confirm it is not allow a comment in the text box. And after save it is allowed.
I don't know if it's to confirm or not.
Comment 5 Telesto 2020-08-16 13:12:01 UTC
(In reply to BogdanB from comment #4)
No error(In reply to BogdanB from comment #4)
> No error, but I confirm it is not allow a comment in the text box. And after
> save it is allowed.
> I don't know if it's to confirm or not.

It's indeed to bugs mixed together. However i do get a error on file reload after saving to DOCX

What version did you use for testing?
Comment 6 BogdanB 2020-08-16 13:14:09 UTC
Version: 7.1.0.0.alpha0+
Build ID: ce6c6a5ad6c9dde09bb0bb0c51e16d828cfe0ef7
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 7 NISZ LibreOffice Team 2020-09-24 14:55:30 UTC
In 7.1 master I don't get sax error either. The comment is not loaded either.

Word does not allow to add comments to textboxes, so not exporting (anymore) is consistent with that.
Comment 8 Gabor Kelemen (allotropia) 2020-09-24 17:25:32 UTC
Bibisected the disappearance of sax error with bibisect-linux64-7.1 to:

https://git.libreoffice.org/core/+/870bb98b3a1159e31895524ef54457db37d1b9af

author	Justin Luth <justin.luth@collabora.com>	Sat Sep 05 13:38:04 2020 +0300
committer	Justin Luth <justin_luth@sil.org>	Sat Sep 05 16:39:48 2020 +0200

tdf#136441 ms export: don't export comments in footnotes

I'm removing regression keyword since that was solved.


About not allowing people to lose their comments in enterprise environments, I guess we could easily extend the solution given to bug #86188 to cover this situation. 
Confirming bug for that case.
Comment 9 NISZ LibreOffice Team 2021-07-22 13:55:09 UTC
*** Bug 143435 has been marked as a duplicate of this bug. ***
Comment 10 Justin L 2022-07-12 21:06:26 UTC
Although the option name is specific to footnotes, is there any reason not to expand it to these similar situations? I'd say just re-use/expand its scope.

Proposal at gerrit.libreoffice.org/c/core/+/137010
Comment 11 Commit Notification 2022-07-19 00:28:02 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e88c41b552ab958579baf3e4bccf941b588a537c

tdf#135794 sw: add no-frames to AllowCommentsInFootnotes

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2022-07-19 17:32:07 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d4ea357e3cf1328597716c701adc255ec8f70a2c

tdf#135794 sw: add no-headers to AllowCommentsInFootnotes

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.