New line in "extra" field induces error during bibliography generation

I got this inscrutable error when generating a bibliography from multiple items: "An error occurred generating your bibliography. Please try again." The under-the-hood error output is

> [JavaScript Error: "TypeError: zoteroField[1] is undefined" {file: "chrome://zotero/content/xpcom/cite.js" line: 416}]

and my error ID is 742883189.

After trying again, restarting, etc., I finally succumbed to a binary search, first to narrow down on the problem items, and then to the problem fields in the item. I determined that adding a newline in the "Extra" field causes the bibliography generation to throw an error. The newline is entered using the "return" keyboard button.

MacOS 10.15.2, Zotero 5.0.85.

I now have many items that have newlines in the "extra" field, and it would be a big pain to change them all. (Especially since I think Zotero still does not have a feature for batch changes?) How do I get around this error? Thank you.
  • That's not from a newline. It looks like it can happen if you have a line that starts with a single letter followed by a colon. We'll fix that, but I'm curious how you ended up with that in your note.
  • (Well, to be fair to me, it *can be caused* by adding the new line (just before a single letter then colon). But thank you for more precisely stating the problem condition.)

    I use the Zotero Scholar Citations plugin which puts citation data in the "extra" field. That plugin usually populates the field with something like "ZSCC: 1" (i.e., letter-then-colon at the start of a line). However, if I the plugin was getting blocked by Google, which happens from time to time, and I wanted to record a citation number by hand, I would start a new line and prepend it with a J, e.g.,

    ZSCC: 1
    J: 2

    Does your answer mean this will not be fixed until the next version of Zotero?
  • The fix is now available in the latest Zotero beta, and it will be included in Zotero 5.0.86.
  • Thank you for the rapid resolution of this problem.
  • Zotero 5.0.86 is out now with this fix.
Sign In or Register to comment.