Citations unlink in Google Docs when copied and pasted into a new document

Hello,

I hope you can help. I have a problem when using Zotero with Google Docs - all of my citations unlink when I copy and paste text between documents. I tried using the keyboard shortcuts, as well as the copy/paste commands from the 'Edit' menu in Gooogle Docs, and the result is the same in both cases.

I use Firefox (v 111.0.1 (64-bit)), my Zotero Connector (v5.0.107) is installed and available, my Zotero desktop app is open, and I am the only person working on on the documents in question.

The issue seems to be the same as the one described here: https://forums.zotero.org/discussion/90041/bug-report-google-docs-citations-are-unlinked-if-i-cut-and-paste-them however I am using Firefox, not Chrome
I have also noticed the instruction here: https://forums.zotero.org/discussion/89640/unlinked-citations-in-google-docs that the new document needs to be fully loaded first before copying and pasting the text, and so I ensured it is, but that didn't help.

My debug output log ID capturing this problem is the following: D1306427049

And the Report ID: 730762742

Steps to reproduce:

1. Open previously saved Doc1 (containing text with in-text citations and bibliography created by zotero) in Google Docs
2. Create a (new) Doc2 in Google Docs.
3. Copy and paste text with citations from Doc1 to Doc2
4. In Doc2, go to the ‘Zotero’ menu and click ‘refresh’ (or any other command)
5. All the citations become unlinked. Error message "You must insert a citation before performing this operation"

If you need any other information please let me know. Many thanks in advance for looking into it.
  • Can you confirm that if you press Refresh in the original document, the citations aren't flagged as unlinked?
  • Yes, that's correct. When I refresh the original document everything works fine, the zotero bar appears, takes a moment to refresh, the citations stay linked, and there are no error messages.
  • Could you submit a Report ID from the Zotero Connector?

    Does it work in a different browser? If you create a new document and insert fresh citations and then try to copy those? Do you see a "Zotero is updating your document" popup after pasting the text with citations in a new document? What if you manually insert some citations into the second document first?

    Did you try disabling other extensions in Firefox?
  • Is there something wrong with the Report ID I've included in my original post above? (Report ID: 730762742) If I need to create a new one, or if I'm misunderstanding what you mean by Report ID, please let me know.

    With regards to your questions:

    Q1. "Does it work in a different browser?"

    - Safari - I am unable to check since Zotero Connector seems to require MacOS 11 or later, whilst I use 10.14.6

    - Chrome - just checked, and the same problem occurs. The only difference is that once I paste the text into the new document and once Zotero is done updating it I get an error message saying: 'response not defined'. When I try to refresh the document afterwards, the citations unlink same as in the original problem. The Report ID for the problem in Chrome is the following: 1336844897

    And steps to reproduce:
    1. Open previously saved Doc1 (containing text with in-text citations and bibliography created by zotero) in Google Docs
    2. Create a (new) Doc2 in Google Docs.
    3. Copy and paste text with citations from Doc1 to Doc2
    4. In Doc2 zotero updates the document and returns an error message 'response not defined'
    4. In Doc2, go to the ‘Zotero’ menu and click ‘refresh’ (or any other command)
    5. All the citations become unlinked. Error message "You must insert a citation before performing this operation"

    Q2. "If you create a new document and insert fresh citations and then try to copy those?"

    - This changes things a bit, however it doesn't fix the problem. Now, when I paste the text into the second document zotero updates it, then returns an error message saying 'response not defined'. When I click 'refresh' Zotero updates the document and doesn't unlink the citations. However, when I right-click on any of the citations and try to 'update it with zotero' it returns an error message 'Selected field b8iUll [the code changes with each citation] not returned from Docs backend'. The Report ID for this problem is the following: 1523047311

    1. Create a (new) Doc2 in Google Docs. Add a citation with Zotero.
    2. Open previously saved Doc1 (containing text with in-text citations and bibliography created by zotero) in Google Docs.
    3. Copy and paste text with citations from Doc1 to Doc2
    4. In Doc2 zotero updates the document and returns an error message 'response not defined'
    5. In Doc2, go to the ‘Zotero’ menu and click ‘refresh’ (or any other command)
    6. Zotero updates Doc2 and returns no notifications
    7. Right-click on a citation in Doc2, click 'edit with zotero'
    8. Zotero returns a message 'Selected field b8iUll not returned from Docs backend'

    Q3. "Do you see a "Zotero is updating your document" popup after pasting the text with citations in a new document?"

    - Yes, every time.

    Q4. "What if you manually insert some citations into the second document first?"

    - Same response as Q2

    Q5. "Did you try disabling other extensions in Firefox?"

    - Yes, and it does not change anything.
  • Can you copy citations between two fresh documents where you insert citations in one and copy into the other?

    Also, if you refresh the original document, do you get a Zotero notification next to the Share button about unlinked citations?
  • No, when I try to copy citations between two fresh documents the same problem occurs.

    And when I refresh the original document everything is fine - Zotero takes a moment to update it, and there are no notifications. All of the citations remain linked.
  • Could you produce a Debug ID for a copy and paste from a fresh document with some text and a single citation into a new document? After that, can you open the developer tools in Firefox (by pressing Cmd-Shift-i) and see if you see any Zotero related errors logged in the console? If you do, could you post them here?
  • For some mysterious reason, everything works fine now. I've just tested copy+paste on a few different documents, including those where the problem first occurred, and citations no longer unlink. I have no idea why that is, since I haven't updated any of the software in the meantime, but I'm definitely glad to see the problem is gone.

    Thank you so much for all your help!
  • I have the same problem, when copy pasting citations in a new document (that already have existing citations) the newly pasted ones become unlinked.
  • We will have to go through the same troubleshooting process.

    Can you confirm that if you press Refresh in the original document, the citations that you are trying to copy aren't flagged as unlinked?
  • edited January 23, 2024
    Yes if I press Refresh in the original document the citations are not unlinked. I've tried a few things, and I have noticed that if I copy and paste the document in smaller sections, the citations are not getting unlinked so far in the new document, so maybe the issue is the size of the task? I was trying to copy a 46 page document into a 75 pages master document. I have more documents to copy paste in this master document which at the end should be around 300 pages, but hopefully copy pasting smaller sections keeps working.

    Update ----
    When I tried copy pasting another of these smaller sections I got the error message "The document citations are being edited by another Zotero user. Please try again later." The citations when pasted were unlinked. I unpasted, and refreshed both documents before attempting to copy paste again the same section, and it worked, but it is strange.

    Also that might be related but sometimes when I try and "refresh" the citations in the document, it asks me to sign in again, as if I keep getting logged out.
  • Glad you got it working. Generally, though, we encourage users working with documents longer than 50-100 pages to work with LibreOffice or Word. The Google Docs editor itself struggles with larger documents, and the Zotero plugin -- doubly so. Moreover, it is quite a bit harder to troubleshoot issues when they arise in Google Docs. We would recommend moving your document chapters by using the following the Zotero document moving between word processors procedure.
  • I will do so, thank you!
Sign In or Register to comment.