@jcolomb Please don’t use Suggest a solution for anything which is in fact a refresh of the initial question and, worse, for a follow-on of a Comment (@EarnestAl’s). You create false notifications for supposed new solutions.
Zotero is a product on its own to manage citations. Inserting them into documents is kind of “by-product”. Zotero team provided this service in a “universal” way, independent of the office suite. This means they didn’t integrate “intimately” and implemented a complete subsystem with macros.
So, either your primary goal is value-text contents and you try to use (limited) built-in features which respect formatting integrity; or you privilege citations and you must accept formatting degradation caused by Zotero macros. I admit this is not central to your present problem.
Zotero citations are “complex objects” in the ODF stream. It is possible that your copy operation does not collect all data needed to create a full-fledged Z-citation. Also, it is possible that Zotero “optimises” citations to same source. Then if you don’t copy the “primary” occurrence, you don’t get all data.
Considering the original question is already 3 years old and addressed a round-trip through an external service, you should ask your own question, describing in detail your context and, perhaps, providing a small sample document. IMHO, this is not a Writer issue, but rather Zotero’s since there is no coordination between LO and Zotero.
sorry about the “suggest a solution”, that is the only obvious button in the platform… I actually looked for a reply button, but could not find it before.
I thought the problem is so similar that it was better discussed here, and since I had it several times in the last 2 days, it is probably still relevant for many users. Also since Sofia mentioned talking to zotero developers, it seemed to me appropriate to continue the conversation here.
For the issue itself: it is not in the copy, but in the paste operation that something goes wrong (since pasting in a new document works). I think it is independent of zotero and lies in the way LO deals with the special fields, but I do not understand enough how LO works to start debugging.
Sorry again and thank you for your time.
Can you attach a small sample document where you make sure the problem occurs? Give step-by-step instructions on how to reproduce the issue. I want to have a look at the exact data Zotero embeds in the document and see if the copy operation (the one retrieving data) gets everything or misses a bit. I’ll check too the paste operation.
Is it eventually possible that Zotero has macros intercepting both copy and paste? (I’d like not to install Zotero in order not to “pollute” my production configuration)
tested on a linux computer and got the same problem, here a file having the issue
zoteroerror.odt (29.7 KB)
(copy all, and paste below the text will give the error: special fields show as text in the document, NB: if one opens a new file and paste, then it works as expected; if one copy all, delete all and paste: first time it works, second time it does not, even if pasted before the text; if one deletes one reference, the paste works for that reference, not for the other…)
Zotero data are stored in custom <text:reference-mark-start …/>
and <text:reference-mark-end …/>
XML elements. Data is duplicated in both elements (why? this is superabundant).
Zotero is not installed in my LO. It looks like the copy operation filters “input” data to normalise it and to retain only what the strict ODF standard defines. I checked exact contents in the clipboard manager. However since this is the OS clipboard, it is possible there is an extra filter step to export data outside LO, but I doubt it. And on second look, the “edit” icon on the clipboard manager does not give access to full raw data. My checks are therefore not conclusive and my hypothesis might be completely wrong.
Considering the failure of my attempts, I reconsidered your previous statement.
Copy-pasting into another document works. There is a different behaviour between in-document copy-paste and out-document copy-paste. But round-trip does not work!
I double-checked: the <text:reference-mark-start …/>
and <text:reference-mark-end …/>
are not there after paste.
Sorry, I can't help more. As I already mentioned, I don't want to install Zotero only to work on this question.
There is LibreOffice bug report about this issue:
Bug 138588 - Not possible to copy and paste Zotero citation