Bug 142759 - Saving DOCX removes EndNote reference fields
Summary: Saving DOCX removes EndNote reference fields
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: All All
: lowest normal
Assignee: Not Assigned
URL: https://support.clarivate.com/Endnote...
Whiteboard:
Keywords: filter:docx
: 142771 (view as bug list)
Depends on:
Blocks: DOCX-Fields
  Show dependency treegraph
 
Reported: 2021-06-10 10:49 UTC by Mohammadreza
Modified: 2023-05-07 13:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
MS Word file with EndNote fields (as references) (22.55 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-06-25 18:33 UTC, Mohammadreza
Details
1.MSWord_original (30.06 KB, image/png)
2021-06-28 20:52 UTC, Mohammadreza
Details
1.MSWord_savedByLibreWriter (15.50 KB, image/png)
2021-06-28 20:52 UTC, Mohammadreza
Details
2.MSWord_original (123.81 KB, image/png)
2021-06-28 20:53 UTC, Mohammadreza
Details
2.MSWord_savedByLibreWriter (123.82 KB, image/png)
2021-06-28 20:53 UTC, Mohammadreza
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohammadreza 2021-06-10 10:49:52 UTC
Description:
Hi,
I have a .docx file with some references added with EndNote reference manager software. When I open the file with LibreOffice Writer and re-save it without any modification, the reference fields are damaged and cannot be used in MS Word and EndNote anymore. But in one free office software named WPS Office, there is no such problem. This is problematic when I want to work with other team's members. 

I was wondering if you would fix this academic issue.

Sincerely,
Mohammadreza

Actual Results:
I have a MS Word file with some fields created by EndNote reference manager software from my professor. When I open the file in LibreOffice Writer, after saving the file to a new file, the fields are no longer compatible with MS Word.

Expected Results:
The fields are damaged and an MS Office user cannot use the fields anymore. The Word says that: "the field codes have been removed".


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Like WPS Office, I expect that LibreOffice Writer becomes more compatible with MS Office and saving the file without any changing, doesn't affect the reference fields.
Comment 1 Dieter 2021-06-25 06:21:32 UTC Comment hidden (obsolete)
Comment 2 Mohammadreza 2021-06-25 18:33:55 UTC
Created attachment 173210 [details]
MS Word file with EndNote fields (as references)
Comment 3 Mohammadreza 2021-06-25 18:36:19 UTC Comment hidden (obsolete)
Comment 4 Dieter 2021-06-28 15:07:10 UTC
Steps for trying to reproduce:
1. Open attachment 173210 [details] in Writer
2. Save as docx
3. Reopen in MS Word (I use Word 2016) and compare with original document opened in writer

Regarding to steps in comment 0 I would expect a problem, but both documents look the same. So i can't confirm the bug report

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

Mohammadreza, if my steps are wrong, please describe steps to reproduce as detailed and as short as possible:
1. ...
2. ...
3. ...
It might also be useful to add a screenshot to make it more clear what "damaged" means.
Comment 5 Mohammadreza 2021-06-28 20:52:04 UTC
Created attachment 173252 [details]
1.MSWord_original
Comment 6 Mohammadreza 2021-06-28 20:52:36 UTC
Created attachment 173253 [details]
1.MSWord_savedByLibreWriter
Comment 7 Mohammadreza 2021-06-28 20:53:23 UTC
Created attachment 173254 [details]
2.MSWord_original
Comment 8 Mohammadreza 2021-06-28 20:53:49 UTC
Created attachment 173255 [details]
2.MSWord_savedByLibreWriter
Comment 9 Mohammadreza 2021-06-28 20:54:20 UTC
Hi and thank you so much.

If you right click on the reference [1] in the MS Word and select "Toggle Field Codes", you can see the field codes. Then Open this file in LibreOffice Writer and just save it without any change. Again open the file in MS Word and check the field codes. Although it is still field codes, EndNote cannot detect it.

I attached four screenshots. First, compare these two:
1.MSWord_original.png
1.MSWord_savedByLibreWriter.png
You can see that EndNote cannot detect the reference after saving by Libre Writer.

Then, compare these two:
2.MSWord_original.png
2.MSWord_savedByLibreWriter.png
Now, the field codes are not the same and that's why EndNote hasn't detect it.

I found that a space after { is omitted by LibreOffice Writer.
Adding a simple space after the first character { manually, can fix the issue and EndNote software detects it as a field. I tried it and it worked.
{ADDIN EN.CITE
{ ADDIN EN.CITE
This workaround does not work for multiple references [1, 2] and this needs another way.

Hope these explanations help. Please let me know if i can be of any help.

I look forward to your solution.

Best,
Mohammadreza
Comment 10 Dieter 2021-08-16 09:42:21 UTC
Thank you for screenshots and additional informations. I assume, that you need EndNote as extension in Word and in LO (for example I can't see "Edit Citation" in my context menu in word. Since I use Zotero, I can't help.
Comment 11 Mohammadreza 2021-08-16 12:53:02 UTC
If LO Writer doesn't change the original field codes, there will be no problem. I was wondering if you could figure out why the field codes are changed by LO. This can solve the problem.
Comment 12 Dieter 2022-08-23 16:39:35 UTC
Hello Mohammadreza, a new major release of LibreOffice is available since this bug was reported. 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.
Comment 13 Timur 2022-09-15 14:35:59 UTC
EndNote is commercial software, available via trial, so hardly will someone get it to test, but there is another way. 
Codes seem to be written in : <w:fldData xml:space="preserve"> and it's lost on LO save.
Comment 14 Mohammadreza 2022-10-31 06:17:32 UTC
(In reply to Dieter from comment #12)
> Hello Mohammadreza, a new major release of LibreOffice is available since
> this bug was reported. 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.

Hi,

Sorry for my delayed reply. I have just installed the latest version, 7.4.2, and the issue exists.
Comment 15 Mohammadreza 2022-10-31 06:19:12 UTC
*** Bug 142771 has been marked as a duplicate of this bug. ***
Comment 16 Dieter 2022-10-31 06:49:17 UTC
Timus confirmed problem in comment 13, so we can change status to NEW
Comment 17 Roman Kuznetsov 2023-05-07 13:10:56 UTC
Still repro in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 69d0be09ad81935f7da4b6f8d036c3562357d068
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL threaded