The highlighted citation no longer exists in your Zotero database. Do you want to select a substitut

Hi there,
Previously LibreOffice was correctly building bibliography. However, I now get this error message: "The highlighted citation no longer exists in your Zotero database. Do you want to select a substitute item?"

I've tried reinstalling: LibreOffice (7.2.7.2 (x64)) ; Zotero (6.0.9) ; zotero-odf-scan-v2.0.47.xpi, but the problem persists.

I can see that they Zotero key for the reference is the same in both the odt file in LibreOffice and in my Zotero database. And I can see LibreOffice accessing Zotero usingb this key, using Zotero Debug Output Logging, and I can find the reference in Zotero by searching Zotero for the key.
So, the error message I'm receiving doesn't make sense to me.

Error report ID is: 1691620964.

Hope you can help me get this working again.
  • Is this after using ODF Scan?
  • Thank you for your reply. Yes, this is after using ODF scan.

    If I take an old saved document, that had been run through Zotero's ODF Scan before the problem started, LibreOffice produces the bibliography correctly.

    However, if I do a new Zotero ODF Scan of the exact same reference LibraOffice reports the "The highlighted citation no longer exists in your Zotero database. Do you want to select a substitute item?" error message.

    When I compare the reference in the LibreOffice document that works with the reference in the LibreOffice document that doesn't work, the last part of the text contained in the references is different:

    The reference that works ends like this:
    "uri":["http://zotero.org/users/undefined/items/BHDBCCIV"],
    "uris":["http://zotero.org/users/undefined/items/BHBDCCIV"]}]} RNDWQiqWAkhxm

    The reference that doesn't work ends like this:
    "uri":["http://zotero.org/users/local/items/BHDBCCIV"],
    "uris":["http://zotero.org/users/local/items/BHBDCCIV"]}]} RNDeGoaVnhNGo

    Hopefully the gives a clue as to what's changed, and what I need to do to fix it.
    The problem started after upgrading Zotero. I do recall some strange messages then about "Run as Administrator", but can't recall the details. I've since unistalled Zotero and reinstalled Zotero 5.0.96.3, which then upgraded to the currently running Zotero 6.0.9 version.

    Many thanks in advance, for your help with resolving this problem.
  • Your library isn't synced I take it? I think that should be fixable (in ODF Scan), though I'm very surprised the former works -- it shouldn't, really.
  • Sorry, I don't know what you mean by "your library isn't synced"
    Is there something I need to do to achieve that?
  • https://www.zotero.org/support/sync
    So yes, you'd have to put your username & password into Zotero. Relevant is just the free (data) sync. File sync is irrelevant for anything citation related.
  • Can Zotero run stand-alone on my PC? That's how I thought I had it set up when things were working.
  • What changed is a change in the ODF Scan add-on (that fixed some other issues), so that's why things aren't working anymore, but I'd want to understand exactly why because the above is all a bit surprising, so I'd want to know if you're syncing -- it's perfectly fine if you're not (there's neither a need nor any sort of obligations), but it's relevant information for me to troubleshoot.
  • In Preferences > SYNC, the username and password are blank, which I think is how it should be if I just want to work locally on my PC, without syncing. Correct?
  • Solved:
    I did replace-all of every instance of "zu:0:" in the Scannable Cites in the source document with "zu:xxxxxxx:", where xxxxxxx is the prefix which Zotero now includes with every citation I drag and drop from Zotero (since upgrading).
    Having done this, LibreOffice now creates the bibliography without reporting any "The highlighted citation no longer exists..." errors.

    However, since I am not using syncing, could you please explain why I see this type of ***online*** reference in every citation in the document created by the ODT Scan?
    "uri":["http://zotero.org/users/undefined/items/BHDBCCIV"],
    "uris":["http://zotero.org/users/undefined/items/BHBDCCIV"]}]} RNDWQiqWAkhxm
  • edited July 8, 2022
    I'm faced with the same error message. I can confirm the difference in the URI: .../users/undefined/... vs now .../users/local/...

    The library isn't synced. Happy to help troubleshoot the underlying issue if you let me know what to do/test. (@adamsmith)
    Zotero 6.0.9, ODF Scan 2.0.47, Linux OS

    @PaulMNZ: Could you please elaborate on your solution/workaround? Where do I get the prefix from?
  • Hi @pukeko.nz
    I found the prefix by setting up a clean new document and dragging a reference from Zotero into it. I discovered that all references dragged in have the same prefix.
  • edited July 8, 2022
    Hi @PaulMNZ
    Thanks for the quick reply. I tried exactly that, but I can't see any static prefix. I tried with APA 7 style (getting a verbose html code) and Scanable Cite code (getting the usual code with "zu:0:").

  • However, since I am not using syncing, could you please explain why I see this type of ***online*** reference in every citation in the document created by the ODT Scan?
    Those aren't online references. As per the label, they are URIs, i.e. record identifiers, not URLs (which are record locators, most commonly web addresses). They look the same for simplicity's sake, but, as you'll see if you paste any of them in a browser, they don't actually link to anything online.
  • @pukeko.nz as a temporary workaround, you can replace the 0 with literally anything: 123 (so zu:123: will work). I'm a bit baffled that's the case, but that of course works nicely.

    @adomasven is the following behavior
    a) expected and
    b) likely to remain stable:
    When an unsynced Zotero database encounters a URI to any library in a (LibreOffice) document, so e.g. uris: ["http://zotero.org/users/123/items/Z97JX7J8"] where "123" is completely random, it looks up the item key (so Z97JX7J8) in the local library and inserts/updates that citation?
  • edited July 8, 2022
    is the following behavior
    a) expected and
    b) likely to remain stable
    a) Not particularly

    b) Probably not

    An item URI in an unsynced library contains users/local/[localUserKey] (e.g., http://zotero.org/users/local/v3aG8nQf) in place of users/[userID]. It looks like we're not actually enforcing this anywhere when parsing URIs, though — we'll accept either format and ignore the localUserKey/userID. Whether this is a good idea is up for debate. It at least has the theoretical potential to result in the wrong item being used to update a citation (if you use someone else's document and have an item with the same key), though that's obviously extremely unlikely.

    It's probably at least fair to say that a local/[localUserKey] URI should always be treated as pointing to the current personal library, whether or not the localUserKey in the database matches (which it wouldn't on other synced computers, unless we started syncing it, which I don't have any desire to do). There's no real reason a different users/[userID] URI should match, though, so I'd be inclined to stop that.

    (Relevant code is here.)
  • Thanks @adamsmith, highly appreciated!
    Workaround did the job and saved my deadline, whew!
  • @pukeko.nz could you please test the beta version here: https://github.com/Juris-M/zotero-odf-scan-plugin/releases/tag/v2.0.48-beta with a "regular" document, i.e. with the z:0: in the markers?

    @dstillman thanks for the code pointer, that was very helpful.
  • @adamsmith, I've tested 2.0.48beta. It now works with z:0: in the markers! If of interest, it also works with the workaround document using z:123:

    Thanks for the great work and exceptional support!
  • Thanks -- now released as 2.0.48
Sign In or Register to comment.