Zotero endlessly duplicating citations in document

This really is killing me. I cannot find a solution.
I even downgraded back to LibOffice 3.6 thinking 4.0 was at fault.

I have a LARGE document with many citations - some of which seem fine but every time I add or refresh zotero in the document I get a huge number of errors - namely:

[IMG] http://i47.tinypic.com/2s80211.jpg [/IMG]

I am presented with a YES/NO choice in a dialog EACH time asking me if I want to keep 'modifications' to my citation text or restore the Zotero database text. It seems impossible - if I click NO I get endless duplications - another one each time around if I click Yes, I STILL get the damn dialog and the lovely feeling that my citation manager won't work properly since the citations are now out of its remit.

What can I do. I am at the end of my tether here. Please help me, I just don't know how to fix this or even how to start untangling the royal mess document has suddenly become.

Macintosh Snow Leopard
Zotero 3
Liboffice 3.6 and 4.0
  • Run through 1-7 here:


    I don't think it makes any sense to go through the trouble of doing 8 if this indeed affects several citations. Make sure that's the case, though: Once you have a copy of the document and that's still not working, try selecting "Yes" and see if Zotero jumps to the next citation or stops complaining. If the latter, just re-insert the citation in question.
  • Thanks for getting back to me so quickly, Adam.

    I followed the steps when the problem first manifested itself to no avail. I'm in the process of re-inserting the problematic citations. I have no idea what might have caused this though. I have been able to edit the document on Linux, Pc and Mac boxes without too many issue up until now. Perplexing.
    Re-inserting citations from scratch seems to do the trick. But it would be nice to know what caused this to occur. The fact that clicking either YES or NO had little effect each time zotero indexed the document is a bit worrying.
  • if possible keep a copy of the non-working document. Simon may want to look at that. I'm only somewhat troubled that you'd get the error message - who knows what happened, some formatting issue or so - but the fact that "No" doesn't solve but exacerbates the problem is not acceptable.
  • If you can send the broken document to support@zotero.org, I'll take a look.
  • I expect dropbox has a version I can give Simon should he need it.
    I'm resolved to just replacing the problematic citations for now so I can get on with things. Your help is much appreciated. The image I posted showed what happens when I pressed NO - it duplicated and appended the citation.

    Again many thanks.
  • Simon - you have mail. Many thanks.
  • Ok this problem is back with a vengeance. I am totally stuck as to what to do. It renders zotero - which I have committed myself to utterly useless for my PhD. I can't simply have it endlessly inserting a copy of the citation even after I press "No" in the aforementioned dialog. It's horrible. I simply can't add in 200+ citations again from scratch at this stage.
    Simon did you get any joy from the file I sent you?
    Is this an issue of me using zotero across various platforms (Linux at Home, Mac at Work)? Is this a problem with different versions of LO? Can anybody help me? Thanks.
  • The problem with the document is that you have a bunch of empty ReferenceMarks, although I'm not sure why. The technique Zotero uses to delete ReferenceMarks appears not to work on empty ReferenceMarks. When Zotero tries to rename a ReferenceMark, which it would normally do by duplicating the ReferenceMark and deleting the old one, it can't delete the old one, so it ends up duplicating it. If you press "Yes," Zotero duplicates it with an empty ReferenceMark. If you press "No," Zotero duplicates it with a new ReferenceMark that contains a subsequent citation.

    Unfortunately, I can't tell you how the empty ReferenceMarks are being generated, but I will try to come up with a workaround for the issues with empty ReferenceMarks.
  • Thanks for getting back to me Simon.

    I think I have a hunch about how the empty Refmarks are being generated. This problem only seems to arise when I edit my document across platforms - specifically from Linux to Mac and back. Is this something to do with added formatting LO understakes? I notice that there is an extra field-shaded linebreak/return at the end of the affected citations. It's terrible - even if I fix this manually I get the endlessly repeating citations.
    Also the document seems to have my last added citation as a header reserved for chapter fields on the first page of the document and deleting this deletes all subsequent header fields.

    Can there be a patch that simply scrubs out all empty reference marks on a refresh or at least ignores them? A fix would be very (I could say desperately) appreciated.
  • Simon has been working on just such a patch
    he'd have to say if there's a version of the plugin that's ready for you to try.
  • The newlines appear to be somehow related to the problem, but they aren't the proximate cause. If you delete the newline, you also have to delete the empty ReferenceMarks to avoid the issues you're having, which isn't easy because they are empty and there's no immediate feedback re: whether or not you have selected them. If you click at the end of the intact citation and press shift-right arrow several times until you reach the end of the note, and then press delete, I think that should delete them.

    In any case, the latest version of the LibreOffice plugin (3.5.5) should have a fix that will make the yes/no buttons in the dialog behave as expected. I don't think this will fix whatever is causing the empty field to be produced in the first place, but it should fix the subsequent endless duplication.

    If you can provide steps that reproduce the issue reliably, I can probably track down the cause.
  • Thanks Adam and Simon.

    The new lines seem to appear when I click the update citations button in the LO zotero toolbar. I think they are somehow generated by zotero (I have no idea how or why) and this causes the problem. If you still have the document I sent along to you, you might not be able to replicate the issue by refreshing the citations as you don't have my zot. database.

    I expect deleting empty reference marks as zotero checks the references might solve the problem without having to address the cause of it.

    Thanks again for your attentive help. It's a problem I've been having recently and comes at a time where manually fixing everything or switching to anoher system just isn't that practical.
  • make sure you update the LO plugin to the 3.5.5 version out now.
  • Thanks Adam, updated the LO plugin just now. I hope it fixes it!
  • an update - if it was needed - the endless updating has abated (thank goodness, nothing quite so disheartening as facing an insane endless loop with no way out) Thanks for that.
    However I'd like to understand why or how these empty ref marks get generated. That still keeps happening and I get duplicated references, one stripped of zotero field codes and a new duplicate with the codes intact. Should Zotero not delete the old reference when combing through the document at the least?

    Sorry to be such a pain but I can't imagine I am the only one effected, or am I?
  • I don't know whether this is quite the same issue, but I'm finding two (only two so far out of around 950) references in my book that repeatedly hold up the Refresh and Add/Edit Bibliography functions in my documents. When they occur, the process stops and generates a message:

    "You have modified this citation since Zotero generated it. Do you want to keep your modification and prevent further updates…"

    I always answer “No”. Nevertheless, these two references come up every time.

    The first of these documents is by Foskett (1976a). (There are two 1976 references by Foskett. The other one is Foskett (1976b). It does not cause problems).

    The second is by Mufwene: (Mufwene 2002, para. 2).

    On refreshing or creating a bibliography, after I've answered Zotero's message, an additional citation to the same document is created, usually on the next line, about 10 or 12 words after the citation. Here is the example by Foskett:

    "...insisted on the cross-societal, cross-cultural or cross-country element, other writers such as Foskett (1976a), Simsova & MacKee (1970, 1975) and Sami (2008) opened the door to comparisons (1976a)that are not cross-societal or cross-cultural in scope. In ..."

    The second (1976a) should not be there. It was inserted by Zotero (or MS Word). I've replicated the fault with Foskett (1976a) and submitted error reports with Debug ID D1976202498 and D1497673709. It shows an additional citation being added every time I refresh or generate a bibliography.

    The same error continues to occur after I deleted the citations and created them anew, repeatedly. I then deleted Foskett 1976a from my database and tried again. The problem recurred. I deleted it from Zotero's trash folder and tried again. The problem recurred.
  • It’s generally not helpful to resurrect years old threads, as issues are rarely the same, even if the messages are similar. Instead, please just start a new thread.

    This sounds like you just have two different versions of the item (e.g., duplicate items) cited in your document. You should find one version of the item (e.g., Foskett 1976b) and replace it with a citation to the other version.
  • So sorry! As a non-expert user I was hesitant to start a new thread in case I annoy the experts who run this forum. And if threads are closed, is this not usually indicated by the moderator?
    Foskett 1976b is a quite different item, not another version. Even if it were, it would not IMHO explain why the system keeps adding an extra citation (in the wrong place in the text) every time I refresh. And when I replicated the fault (citing debug IDs) I used only a short piece of text.
    Anyway, I'll try to sort this out myself and if I don't succeed I'll come back to start a new thread.
  • On refreshing or creating a bibliography, after I've answered Zotero's message, an additional citation to the same document is created, usually on the next line, about 10 or 12 words after the citation. Here is the example by Foskett:
    This actually sounds like there's some leftover/corruption from an old version of the cite.

    Try this
    Starting with the "show field code" bit at the bottom.
Sign In or Register to comment.