Copy-paste troubles in Google Docs - Zotero fields cannot be inserted here

Sometimes, when I copy and paste a section that contains a citation within a Google Document, it starts giving me the "Zotero fields cannot be inserted here" error, when I try to insert the next citation (normal citation, normal text). Reloading and restarting Zotero doesn't fix it.

I use Google Chrome and have only Zotero extension enabled (not even offline Google Docs, for worries it may mess with Zotero).

Workaround for this bug:
So far I have fortunately been able to always remember which was the last thing I did. When I delete that copy-pasted citation, it starts working normally again. So I just reinsert that last citation again and then continue my work.
  • If you manage to reliably reproduce the issue please let us know.
  • I have a similar though not identical issue: in my case, copy-pasting passages that include Zotero citations (to move them to other locations in the Doc) removes the fields, so that the citation becomes normal text and is removed from the reference list. I haven't found a workaround, and the issue is occurring consistently (Google Docs in Firefox).

    Furthermore, I sometimes cannot change citations - they are still recognized as Zotero fields, but when I want to edit them, I receive the "Zotero fields cannot be inserted here" error. Not sure what the conditions are under which this happens.
  • @ZielonyGrzyb: Are you saying that happens every time you copy sections? Can you provide a Debug ID from the Zotero Connector for doing that, as well as a Report ID from Zotero?

    Also, does that happen in every document or just a specific document?
  • An addition to my error and the workaround: just deleting ANY one citation fixes it, and I can start inserting citations normally again. Very interesting. Hope this is helpful for others who experience the same bug.
  • @kjell.kuehne It is likely that just placing the cursor in a citation and then out of it is enough.

    @ZielonyGrzyb Do you have the Zotero Connector installed on the computer that you do copy-pasting? Copying and pasting between google docs will not retain citations if you do not have the connector. If you do, can you reliably reproduce this every time?
  • I wasn't able to replicate the error recently (neither in the document in which it originally occurred, nor in other documents). So it does not appear consistently, and maybe the recent Zotero update has solved the problem?

    @adomasven I copy and pasted within a Google doc, not between different documents. But yes, I do have the Zotero Connector for Firefox installed.

    Suddenly, though, I seem to be experiencing the problem described by @kjell.kuehne more frequently. Deleting the citation works (but is annoying); placing the cursor elsewhere doesn't. Usually, the problem appears after opening a Google doc, when I first try to edit an existing citation.
  • @ZielonyGrzyb can you reproduce it every time or at least every other time in your existent document?
  • Hello, I experienced a similar problem. I use Zotero in gdocs both in Chrome and Firefox (I use Windows 10 and I installed the connector for both browsers). I replicated the experience in two different files (including a test file created on purpose). The problem is:

    Within the same gdoc, when I cut-paste a text with a citation, I lost Zotero fields. If I copy-paste instead of cut-paste, the field is retained if I do not delete the originally copied text with Zotero field, but as soon as I delete the original text the field is lost also in the copied text.

    Partial workaround: re-insert Zotero field all the time I move a text within a gdoc.

    Workaround limitations: it demands extra attention and time (i.e. re-insert citations), and - especially in group work (as it is the case) - exposes to the high risk of loosing references (because citations can remain unnoticed in simple text as oppose to Zotero field). Moreover not all authors of the text have Zotero active, therefore they cannot re-introduce citations).
  • If you have the connector installed and enabled in the browser copy-pasting should work fine. Could you share a copy of the file with which you have been reproducing this problem with support@zotero.org as well as the specific version of the browser you used to reproduce?
  • Sure I will share the two files.

    Versions:

    Chrome - Version 80.0.3987.149 (Official Build) (64-bit) - Zotero Connector 5.0.61

    Firefox - Version 74.0 (64-bit) - Zotero Connector 5.0.61
  • I have tested copying and pasting in the documents (private copies) that you have shared and it seems to work fine on my end on Chrome. Every time after cutting and pasting I get a "Zotero is updating your document. Please wait" overlay and after that the pasted citations are editable.

    When you perform the test for cutting and pasting do you see the Zotero menu at the top of the page? If not, then something is wrong with the way the Zotero google docs plugin has initialized. Do you see it if you refresh the document? Does it appear if you disable other installed extensions and restart the browser?
  • Copy-paste seems to work but actually does not work properly. It only works if:

    1. Copy the original text and Zotero sources;
    2. Reflresh Zotero within the gdoc;
    3. Delete the original source and leave only the copied source;

    Without step 2 above, after deleting the original text and refreshing the Zotero field is lost in the copied text and the reference disappear from the reference list.

    Cut-paste does not work and (to respond to your questions): I see the zotero menu, I disabled all other chrome extensions.

    I sent an email to support@zotero.org with a videocast where you can see my screen while I perform these tests.
  • @cgianolla: Thanks. Can you try again with the latest Zotero Connector beta for Firefox?
  • I deinstalled the Zotero plugin in Firefox but when trying to install the beta version I am returned the message "The add-on could not be downloaded because of a connection failure". I have tried several times today and experienced always this issue.
  • Something's wrong with your internet connection.

    If you open the Web Console (Ctrl-Shift-K), do you see any errors when you try to install? What do you see for the site certificate info for this site?

    In any case, you should be able to right-click on the link, download the XPI to disk, and drag it to Firefox to install it.
  • Thanks I could install version 5.0.61beta3 through right-click.

    I could perform the test and cut-paste works fine however copy-paste does not work.

    I am sending a video again to support@zotero.org.
  • @cgianolla Ok we have deployed a fix for the Beta version of the connector for the copying problems. Could you test it and confirm it works as expected now?
  • @adomasven thanks for this. In Firefox now works fine both cut-paste and copy-paste. However there is a related error: if I highlight a text within a document (regardless of which text) and refresh zotero, that text highlighted will be erased after Zotero refresh.
  • Highlighted text is indeed removed when performing any of the Zotero commands in Google Docs. Unfortunately that is not something that we can fix due to technical reasons, but it's a minor issue that we're not too concerned about.

    Thanks for the help in debugging this. We'll post here when the fix is out on the release version of the Connector for both Firefox and Chrome.
  • Thank you for the excellent assistance and I look forward to the new release.
  • The fix is now available in the release version of the Connector for both Chrome and Firefox.
  • Thank you very much!
  • @adomasven I'm having a similar problem to the one you've been addressing with cgianolla. Using Google docs and Firefox, Zotero connector version 5.0.63. Copy-pasting text works, but cut-pasting and dragging (highlighting a block of text and dragging it elsewhere in the doc) causes an error when I try to edit one of the citations ("Selected field null not returned from Docs backend"). Sometimes undoing the change restores the citation, but sometimes it does not, and the same error message displays except that 'null' is replaced by a string of maybe 5 letters/numbers.
  • Moving text by dragging via mouse is likely to break links between citations. We'll see if we can get it to work. Cutting and pasting should work fine with the current version of the Connector. Can you reproduce it in a new document?

    If you have your citations unlinked the best way to revert that is to restore a version of the document from the Google Docs revision history
  • edited May 8, 2020
    Report ID: 1256195636 I am having the same problem as alterum . As soon as I touch a citation to edit it I get the selected field null not returned from Docs backend error. I am in Chrome Version 81.0.4044.129 (Official Build) (64-bit) and Zotero 5.0.85 desktop and zotero connector 5.0.64 and using it in a shared gdoc with multiple users all who are doing iterative copy/pasting and updates(theoretically not to the citations but . . . . ) FYI NOT all the users in the gdoc are also zotero users AND I think the content in the document with the citations was created by a copy /paste from another gdoc where the citations were first linked up . . . so yeah, there's a bunch of places where this could be "going wrong". Any hints? Restrictions : I Can't reduce number of contributors in the gdoc, and I can't ever guarantee that all the gdoc contributors will have installed the zotero connector or be members of the shared library. Am I past the point of no return?
  • @nkmeyers I'm sorry to say that in your case you will not have much luck with Zotero integration I'm afraid. If you have collaborators that do not use the Zotero Connector citations will inevitably get unlinked.
  • Hello, I was looking for solutions on the internet on the same topic. I have exactly the same problem. As far as I understand, the only solution is to re-insert the reference. But I would like to know if this problem has been fixed. From what I see the last message on this blog was in 2020. Thank you very much for your response and your help.
Sign In or Register to comment.