Zotero docx bookmark issue with libreoffice writer on Ubuntu

Specs:

LO version-LibreOffice 5.4.6.2 40m0(Build:2) (installed from ubuntu’s repository)

Ubuntu version: 17.10

Zotero version: 5.0.47 (installed from zotero website)

Freshly downloaded zotero integration plugins

For background see this zotero thread: Ubuntu LibreOffice bookmark issues: new lines, junk bookmarks, etc - Zotero Forums

Zotero support indicates this is not a Zotero issue, and possibly a LO issue. This issue seems to occur only with DOCX, not odt or doc format.
Issue: When reopening saved docx documents with citations in bookmark form, LO/Zotero insist citations have been modified, and offers this dialogue:

“You have modified this citation since
Zotero generated it. Do you want to
keep your modifications and prevent
future updates? Clicking “Yes” will
prevent Zotero from updating this
citation if you add additional
citations, switch styles, or modify
the item to which it refers. Clicking
“No” will erase your changes.”

If you respond no, it will create a duplicate in text citation. If you respond yes (and lose the ability to have the citation update if you modify the corresponding zotero item or switch styles) it will also often create a duplicate citation.

Secondary issue: A lot of random, extra bookmarks are created during this process with names like __UnoMark__2165_1855068224 which hampers functionality of the bookmark navigation window.

STEPS TO RECREATE:

  1. Start a new blank document in LO.

  2. hit new zotero citation button.

  3. Prefs dialogue pops up.
    -Choose style Geoarchaeology (or Quaternary Science Reviews, happens with that too; haven’t tried others so far)
    -Choose bookmarks
    -Automatically update citations is on

  4. Add a citation.

  5. Save document as docx, then close

  6. Reopen document.

  7. Hit zotero refresh button. It tells me the citation has been modified. Regardless if I click yes (stop updating it) or no (keep updating it normally), a duplicate in text citation will be created next to the first one.

Zotero support looked at sample document created with this method and indicated that document was corrupt.

I was having the same problem with certain citations in LO 6.4.5.2 today (August 10, 2020) on Ubuntu 18.04.03 using Zotero 5.0.89 and ACS citation format. I converted from docx to doc, and the problem stopped. I consider this to be a relevant and timely solution. Thank you for sharing!