Zotero Integration Error
Hi All,
I'm having trouble with a couple of citations that are causing the below error from the LibreOffice plugin - I'm using Ubuntu 16.04 with LibreOffice 6.0.6.2.
Documents that include these citations also experience the same error when attempting to update document preferences / change citation style. Removing the citations resolves the error.
Both relate to additions to in text citations at the end of a block quote, in one case a page range and in another a suffix.
Both seem to be where a citation wraps to the next line as a result (I'm not sure if this is significant or a coincidence).
Citation 1 (error report 176433816)
The citation includes: a page number, prefix "quoted in", suffix "words in braces Hancock's".
The error appears to present only when the apostrophe is placed in "Hancock's", the addition or subtraction of anything else doesn't seem to matter.
Citation 2 (error report 666826516)
Includes a page range "pp.13-14".
The error only appears when the en-dash is inserted between two numbers. A single number, no matter how long, does not trigger the error.
Troubleshooting
So far I have:
It might also be worth noting that both of these citations were included in documents some time ago, and have only begun to give problems now I'm trying to combine them into a larger doc.
Given the Zotero plugin code hasn't changed in quite some time, this could indicate a LibreOffice regression. Happy to post a bug there if that's the case, but I'd need a bit more to go on before I can.
I'm having trouble with a couple of citations that are causing the below error from the LibreOffice plugin - I'm using Ubuntu 16.04 with LibreOffice 6.0.6.2.
Documents that include these citations also experience the same error when attempting to update document preferences / change citation style. Removing the citations resolves the error.
Zotero experienced an error updating your document.
An error occurred communicating with Zotero:
java.lang.ClassCastException: com.sun.star.uno.Any cannot be cast to java.lang.String
at org.zotero.integration.ooo.comp.ReferenceMark.setText(ReferenceMark.java:230)
at org.zotero.integration.ooo.comp.CommMessage.execute(CommMessage.java:147)
at org.zotero.integration.ooo.comp.CommMessage.getBytes(CommMessage.java:61)
at org.zotero.integration.ooo.comp.CommServer.run(CommServer.java:84)
at java.lang.Thread.run(Thread.java:748)
Both relate to additions to in text citations at the end of a block quote, in one case a page range and in another a suffix.
Both seem to be where a citation wraps to the next line as a result (I'm not sure if this is significant or a coincidence).
Citation 1 (error report 176433816)
The citation includes: a page number, prefix "quoted in", suffix "words in braces Hancock's".
The error appears to present only when the apostrophe is placed in "Hancock's", the addition or subtraction of anything else doesn't seem to matter.
Citation 2 (error report 666826516)
Includes a page range "pp.13-14".
The error only appears when the en-dash is inserted between two numbers. A single number, no matter how long, does not trigger the error.
Troubleshooting
So far I have:
- Checked that no track changes are present
- Made sure there are no citations in image captions
- Removed any bibliography
- Copied text into new document (error persists)
- Bisected the docs to find the troublesome citation
- Checked errors in Help | Report errors
- Checked removing citations resolves the error, and reinserting it causes it to return
- Reproduced the errors by copying the paragraph (text only) into a new document and inserting new citations
It might also be worth noting that both of these citations were included in documents some time ago, and have only begun to give problems now I'm trying to combine them into a larger doc.
Given the Zotero plugin code hasn't changed in quite some time, this could indicate a LibreOffice regression. Happy to post a bug there if that's the case, but I'd need a bit more to go on before I can.
I've also played around with default styles and resetting LibreOffice to default (deleting ~/.config/libreoffice) to eliminate the possibility that there's common issue with styles I've created (e.g. a naming convention or an inherited setting), or a problem with my profile.
What I've found is the error appears any time a style has anything other than itself set as the 'next style' in the paragraph settings. This is true for both custom and default styles. It also doesn't seem to matter what the next style is, if it's not itself it throws the error.
Steps to recreate
Open a LibreOffice document and insert some text.
Insert a Zotero reference that uses a format above (e.g. pp.13-14)
Reference is added as expected.
Delete reference
Open Style Manager (F11)
Modify current style to make the next style something other than itself - right click | Modify | Organiser tab | Next Style
Reinsert Zotero reference using format above
Zotero throws an Integration Error
Modify Next Style back to the paragraph style (i.e. itself)
Error disappears and reference is added as expected.
This is a pretty interesting edge case. It's only apparent on two of the thousands of references I have in an ~86k word / 225 page document.
https://bugs.documentfoundation.org/show_bug.cgi?id=124842