Zotero stopped working in a Google Doc (that is previously worked in)
Hello,
I used Zotero in a Google Doc a few months ago, and generally had no problems. I have come back to it now, and whenever I try to input a citation from the "Add/edit citation" button I get a very long and uninterpretable error. I have tried turning off the automatic sync function and citing different sources but the same thing happens every time.
Other information: I tried inserting a citation into a new and empty Google Doc and it worked fine, however when I make a copy of the doc I am working on, it does not work in there either. Also I have restarted chrome (the browser I'm using), my computer, and Zotero, and have checked that Zoetero is up to date. Also, potentially unrelated, whenever I cut and paste something in my current document (even if it has nothing to do with a citation or Zotero) I get a message that says "Zotero is updating your document. Please wait…".
I would very much appreciate any help, I have a big deadline coming up and it would be great to get this working ASAP. Thank you in advance!
bug report number: 1712296414
I used Zotero in a Google Doc a few months ago, and generally had no problems. I have come back to it now, and whenever I try to input a citation from the "Add/edit citation" button I get a very long and uninterpretable error. I have tried turning off the automatic sync function and citing different sources but the same thing happens every time.
Other information: I tried inserting a citation into a new and empty Google Doc and it worked fine, however when I make a copy of the doc I am working on, it does not work in there either. Also I have restarted chrome (the browser I'm using), my computer, and Zotero, and have checked that Zoetero is up to date. Also, potentially unrelated, whenever I cut and paste something in my current document (even if it has nothing to do with a citation or Zotero) I get a message that says "Zotero is updating your document. Please wait…".
I would very much appreciate any help, I have a big deadline coming up and it would be great to get this working ASAP. Thank you in advance!
bug report number: 1712296414
`[JavaScript Error: "Error: Ranges corrupt on Z_F4fWRXB000.
["Z_F4fWRXB000ITEM CSL_CITATION`
and then has code for a specific citation and then at the end of that citation says:
` at Code (Zotero Google Docs Integration):219 (decodeRanges)
at Code (Zotero Google Docs Integration):580
at Code (Zotero Google Docs Integration):123
at Code (Zotero Google Docs Integration):104 (getFields)
at Code (Zotero Google Docs Integration):355
at Code (Zotero Google Docs Integration):72 (callMethod)`.
This repeats multiple times but as far as I can tell it is the same error over and over again. Hope that is more informative and thanks for your help!
1. Go into the document revision history (File -> Version History -> See Version History)
2. Find a revision somewhere in the middle of the long list of revisions. Click the "..." icon and make a copy. In the copy check with Zotero whether you can perform an action that was previously broken.
3a. If broken go back to the original list of revisions and find the approximate midpoint-revision between the one you tested before and the oldest one. Make a copy and check whether it is no longer broken.
3b. If not broken go back to the original list of revisions and find the approximate midpoint-revision between the one you tested before and the newest one. Make a copy and check whether it is broken.
4. Keep on performing the step 3. If a revision is broken, try to find an earlier not broken one, and if it is broken, try to find a later broken one, until you are left with a single change.
Please specify/explain what changed in the revision that produced the broken state. Note that the process of halving the number of revisions to check should not take more than 11 or 12 steps even if you have something like 1000 revisions.
The broken document is actually a copy of a document that worked but it seems that this one never has. I went back to the earliest version of the document I'm working in, made a copy, and tried to insert a citation. I got a new error that said:
CSL error
TypeError: this.registry.citationreg.citationById[c[0]] is undefined
citationID=undefined
noteIndex=-1
atarray citationsPre index 0, from citation at document position 1
Then I went back to the newest version of the document that I created a copy from and successfully made a citation in there, but when I try to make another the loading bar is so slow that it doesn't work and I just have to quit Zotero (but no error). Any advice?Are there often problems associated with making copies of documents with citations? When I did it I just clicked "duplicate" I didn't copy and paste across docs. Thanks!
1. Open the Zotero Connector preferences
2. In the Advanced tab of the Zotero Connector preferences, check the box next to “Enable Logging.” Do not close this tab.
3. Begin a google docs procedure that takes a long time and wait at least 10 minutes.
4. Go back to the Advanced tab of the Zotero Connector preferences, uncheck "Enable Logging" and click Submit to Zotero Server.
5. You will be provided with a Debug ID (e.g., “D12345678”). Please post the Debug ID in this thread.
Also, would it help to uninstall the chrome extension and reinstall it? I am nervous because I get an error when I try to unlink citations (in a copied document) and I don't want to lose all of my work if something goes wrong with the extension. Do you think this (uninstall/reinstall) might help, or is it not worth it?
Thanks!
I've noticed that all your codes are duplicated three times in the document somehow, so you might have luck by running this function in google doc's script editor on your latest revision of the document:
1. In Google Docs: Tools -> Script Editor
2. Overwrite the contents of the editor with this function and save the script
3. Run -> Run Function -> removeDuplicateRanges
This might prompt google to do some additional authorization steps for the code, publish it and google might at one point say that your published script is unsafe. You should proceed. After running the script try editing the doc with Zotero again.
If this does not help and you do not have the document before the copy with older revisions to check for when the corruption occurred then it is likely there is little that can be done for this document aside from starting from scratch regarding citations.
Too many changes applied before saving document. Please save changes in smaller batches using Document.saveAndClose(), then reopen the document with Document.openById().
It doesn't seem too difficult but I'm not sure how to incorporate it into the code. Any advice? Thanks again!