Error: Console is not defined

edited April 17, 2017
Hi all.
I'm having this strange error in Zotero (Linux, Libreoffice, Zotero 5.0-beta.178+8a7d405).
I have a document with some references and bibliography built using zotero v4.0.29. Now that I am on version 5, Whenever I try to change something Zotero related on the document (refresh, set document proprieties, insert citation, etc) I get this error:

Zotero experienced an error updating your document.

console is not defined

I have set debug output on and submitted it to Zoter's servers: The Debug ID is D2091940295.
Searching the forums did not return any significant hits on the issue.
I have tried some of the "Debugging broken documents" tips, but nothing seemed to help.

I'm going to try and rebuild the document from scratch and see if I get it to work, but I hope this report can help fix it (I'll keep a copy of this document to help with further debugging).
  • Update: This is occurring even after I copied and pasted all the text to a new document (field codes included)...
  • Can you insert citations in an empty, new document?
  • Yes, new documents work fine.
    I can insert citations, add bibliography, set preferences and all works fine. Thanks for looking it up.
  • (They say above that they did. Also, given the mysterious error message and that this happens in the beta, we'd definitely want to follow up.)
  • Oh, sorry. I looked over the info about debugging the document.
  • Follow up:
    Copy & paste into a new document does allow me some more room:
    In the new document, if I try to set the preferences, I get the error and in the bibliography section I get the "{Citation}" field, but no text.
    So I took another step. I cerated a new document, copied & pasted the contents and deleted the bibliography entry.
    When I push the "Set document preferences" and select the current style (BMC Bioinformatics) I get no erros. Switching to a similar style (Plos One) where the in-text bibliographic entries are shown as "[1]" instead of "(Altschul et al. 1990)" does not trigger an error (but no changes are made to the entries anyway). Switching to a different style such as "Molecular Ecology" or trying to insert bibliography will trigger the same error again.
    Would you like the debug logs of any of these situations?
  • I don't think at this point more debug logs will help, but knowing that this depends on the style is helpful, thanks. We'll need @dstillman lto look at the debug and then see about next steps.
  • I'm trying to rebuild the document paragraph by paragraph and see if I can track the problem.
    Doing it in halves was resulting in crashes, so I'm now trying this approach.
    I'll post any other feedback I may have until @dstillman can look at this.
  • So I seem to have tracked down the problem using a new document, one citation at a time.
    I have a citation for GNU R which seems to be immediately trigger the bug as soon as I add it to the document. This can happen either by copying & pasting from another document (bug shows up when I hit refresh, or perform any action that causes a refresh, such as "add bibiography), or if I add it directly using "Insert citation" (which causes the bug immediately).
    You can find the exported item here (Zotero RDF format):

    I will keep up this process to see if there are any further citations that can cause the issue.
    But this document was working with zotero 4.x, so I'd wager this is a 5.0 bug.
  • might be related to single-field authors?
  • edited April 17, 2017
    Yes! Here is another reference that provokes the same error:
    It's also single author.
    Can you reproduce this?
  • Sorry, on Windows w/o 5.0 installed right now, but I'd expect this is reproducible. Not the first time this has come up as a problem. CC @fbennett -- might be in your court, not sure.
  • edited April 17, 2017
    At least we are now on the right track.
    Is there a more formal project bug tracker where this can be submitted?
    Also, is there any known workaround so I can submit this paper (other than typing the stuff in manually - maybe adding an empty second author field?)
  • Fixed in the latest beta — sorry about that. (There were some stray console.log() lines in the latest citeproc-js version. I removed those manually and created an issue for fbennett.)
  • Thank you, @dstillman and @adamsmith !
    Latest beta (5.0-beta.179+2160b1c) solves the issue.
  • I owe an apology for the bad citeproc-js release. It's been fixed, we should be back on track now.
  • on the plus side, I just stumbled in to this and it had already been fixed before I could even report the error! so pretty good going there.
  • @fbennet It's OK! We all make mistakes. It's what we do about it that matters. This case was an example of quick response, just like @"Jon Rubin" stated.
    Cheers for that.
Sign In or Register to comment.