Add to Note does note work anymore

I am using Zotero 6.0.30 and the "Add to Note" function from highlighted text does somehow not work anymore. I used it quite often before but now nothing happens if I click the button. Interestingly, selecting an area and adding it to the note works fine. It is just adding text to the note which does not work anymore.

The only thing that I changed a few months ago was the sync routine. I am using now a Webdav server and it might be that I did a mistake in setting it up. But except for the Add to Note thing I did not encounter any problems and syncing works well. Any ideas what I could try to solve it?
  • Nothing to do with syncing.

    To be clear, a note has to be open in the right-hand pane for Add to Note to be active. Beyond that, disable any third-party plugins you're running.
  • Thanks @dstillman for your answer! Yes I know that a note has to be open in the right-hand pane. I tried disabling all third-party plugins and restarted Zotero but this did not help. And as I mentioned "Select Area" and Add to Note works fine. The only thing that does not work is to add text to the note. Both from a highlighted text or just from selected text does not work. Any other ideas?
  • Can you provide a Debug ID for clicking Add to Note where nothing happens?
  • Yes sure, here it is: D567675516
  • What also does not work is to simply copy text from the PDF (with Ctrl+C or right-clicking->Copy) and then paste it into a note with Ctrl+V. But what works is to paste it with Ctrl+Shift+V! When it fails I see in the logs following lines:

    (3)(+0004431): Using note template:

    (3)(+0000001): ===>undefined<=== (undefined)

    (1)(+0000000): TypeError: template is undefined serializeAnnotations@chrome://zotero/content/xpcom/editorInstance.js:1496:7 EditorInstance/<@chrome://zotero/content/xpcom/editorInstance.js:480:48

    The first two also appear when I run "Add to Note". Maybe this information helps.
  • If you're using a note template, you should fix it or reset it.
  • I'm not using a note template, so there is not really something I can reset there, right?
  • I suspect you modified this at some point. Go to the Config Editor at the bottom of the Advanced pane of the settings, search for noteTemplates, and reset any that show up in bold.
  • When I do this no entry with `noteTemplates` in it appears...
  • If you go to Tools → Developer → Run JavaScript and run this, what's the output?

    ['highlight', 'note', 'title'].map(x => Zotero.Prefs.get(`annotations.noteTemplates.${x}`))
  • edited January 15, 2024
    This is the output:
    ```
    [
    "0": undefined
    "1": undefined
    "2": undefined
    ]
    ```
  • OK, yeah, your settings are corrupted. Go to the Sync pane of the settings and unlink your account from syncing (without removing local data), and then close Zotero, go to your Zotero profile folder, and delete prefs.js. This will clear all settings. After restarting Zotero, see if it works. (The above command would also show values if it's fixed.) You'll need to log back in to sync.

    This might happen if you copied your Zotero profile folder from another computer, if security software is interfering, or if there's some other problems with permissions in your profile folder.

    If none of that helps, you can also try reinstalling Zotero from the download page, though that usually doesn't do anything.
  • Thanks a lot for the help! Clearing the settings alone did not help but reinstalling Zotero completely and setting it up freshly fixed now the "Add to Note" problem at least. However, I am struggling with the syncing settings and I have the feeling that this could have been the problem in the beginning.

    What I am want to do is to sync PDFs and attachments on my own Nextcloud server via WebDAV. For this I activated "Sync attachment files in My Library using WebDAV" and verification of the server also works.

    But now I am a bit confused about what else I need to do:
    1. What path do I have to add to Advanced>Files and Folders>Linked Attachment Base Directory>Base directory? Or can I leave this empty?
    2. Do I have to set up ZotFiles to move the attachments to a certain path? It would also be great to read and annotate the PDFs on my iPhone and I found this to only work if I selct "Attach stored copy of file(s)" in ZotFile Preferences>Location of Files. Is this correct?

    Thanks a lot in advance for your help!!
  • edited January 16, 2024
    If you're using Zotero syncing, you shouldn't do anything related to linked files. Linked files don't sync.

    The iOS app supports WebDAV.

    (None of this would have anything to do with the original issue, though. That was some sort of corruption of your installation.)
  • Ok thanks a lot for the quick replies!!
  • @dstillman - Can you elaborate on:

    "This might happen if you copied your Zotero profile folder from another computer, if security software is interfering, or if there's some other problems with permissions in your profile folder."

    I'm having the same issue as above and getting the same output after I've deleted the prefs.js file. We've noted that this issue is not happening on personal computers, but only on work devices (across several installs, including fresh installs). No third-party plugins. The profile folder seems to have full privileges by the user account.

    Given the above, this must be related to the security software, but not sure how we'd go about identifying the specific conflict as it pertains these annotation/note features (Add to Note & Add Note from Annotations). Any thoughts?
Sign In or Register to comment.