bug report 623366353 trying to empty trash

I followed the instructions for uploading exporting my endnote database and importing to zotero https://www.zotero.org/support/kb/importing_records_from_endnote. I wanted to invoke hidden preferences to not include notes for unmapped items, and include the RIS ID, but I thought I would be allowed to invoke these after selecting the file to import. Once it got started, I let it run to see what would happen...it took about 4 hours on a good computer to import 9800 references. I moved these to the trash with some difficulty, but now when I try to empty the trash, I get the XUL runner error, and now this error. It is not feasible to go through 10000 items and highlight them and delete them bit by bit. I have references I want to keep that are already in Zotero, so starting from a new database is not a good option. Not sure how to empty these from the trash.
  • edited April 24, 2014
    You could temporarily disable auto-sync and try to restore a backup database from before the import (either one of the automatic ones in your Zotero data directory or from your own backups), and then, assuming you've synced, do Restore to Zotero Server from the Sync -> Reset pane of the Zotero prefs.

    Otherwise, you'll just have to delete in batches (1000 items, say) from the trash (and I would recommend syncing in between).

    A future version will be better at deleting large numbers of items from the trash at once.
  • I wanted to invoke hidden preferences to not include notes for unmapped items, and include the RIS ID
    If you disable notes, you also will not get the EndNote ID. Definitely have to set them before importing. We will make that clearer in the instructions.
    but now when I try to empty the trash, I get the XUL runner error, and now this error. It is not feasible to go through 10000 items and highlight them and delete them bit by bit.
    Yes, this is a quite frustrating limitation at the moment. The best advice I can provide is to disable automatic sync (Preferences -> Sync -> uncheck Sync automatically), back up your Zotero library, and attempt to restore it from last automatic backup (unless you have a backup you made, in which case you can do that as well). Hopefully that was not recent enough to capture the imported library, but was not old enough so you don't lose the items you want to keep from before the import. If everything works and you had managed to sync the imported items to zotero.org, you can follow the instructions here: https://www.zotero.org/support/zotero_data#restoring_your_zotero_library_from_a_backup_and_overwriting_synced_changes
  • Otherwise, you'll just have to delete in batches (1000 items, say) from the trash (and I would recommend syncing in between).
    To do this, select the first item in the trash, use the scroller to go about 1/10th down the list, while holding Shift, select another item. This should select about 1000 items in the trash. Press Shift+Del to remove from trash (@Dan, there is no right-click solution, right?)
  • (You don't need to press Shift-Delete. Just press Delete.)
    (@Dan, there is no right-click solution, right?)
    There is not.
  • Thank you both for your thoughtful help. I usually am much better at making backups before doing major things like this, but I hurried it and didn't do it in this case, and my most recent .bak file from prior to the upload is from Nov 2013, too long ago. I am forced to take the deletion route. Two questions for you as I try that:

    1) I am running Standalone and the Firefox plug in from the same database. Is there a preferred place from where I should do the deletions..Standalone or plugin? Should I have the other one closed when I do them?
    2) Using Zotero standalone 4.0.19 on Windows 7, the only way I have found that works to delete items is to select each individual title by clicking on it while holding the CTRL key down, skipping over the two notes attached to each item in the trash. After selecting about 250 (as many as I an tolerate clicking in one session), I press the Delete key, and it takes a few minutes but it will delete those selected items. If I try to select across say 1/10 of all items in the full Trash list, holding down the SHIFT key, and then press Delete, or Shift+DELETE (shift and delete held down at the same time), nothing happens. Am I doing something wrong? Doing it 250 pecks at a time is going to send me to the loony bin.
    3) For future cases, when I do have a good .bak file, what impact does restoring a .bak file have on Group Libraries? Do group libraries have separate .bak files?
  • 1) I am running Standalone and the Firefox plug in from the same database. Is there a preferred place from where I should do the deletions..Standalone or plugin? Should I have the other one closed when I do them?
    It should not make a difference, but since these deletions take some time, you probably want to do this in Standalone, since that will not freeze up your browser.
    2)the only way I have found that works to delete items is to select each individual title by clicking on it while holding the CTRL key down, skipping over the two notes attached to each item in the trash. After selecting about 250 (as many as I an tolerate clicking in one session), I press the Delete key, and it takes a few minutes but it will delete those selected items. If I try to select across say 1/10 of all items in the full Trash list, holding down the SHIFT key, and then press Delete, or Shift+DELETE (shift and delete held down at the same time), nothing happens. Am I doing something wrong?
    Press the minus/dash key on your keyboard while in Trash to collapse all items (i.e. hide attachments/notes). Looks like Delete key does not work when you select both items and attachments/notes.
    For future cases, when I do have a good .bak file, what impact does restoring a .bak file have on Group Libraries? Do group libraries have separate .bak files?
    Everything you see in Zotero (except the actual attachments) is stored in a single file. Restoring the bak will restore your personal and your group libraries. I added instructions to the EndNote import page to urge users to create backups before importing.
  • edited April 24, 2014
    my most recent .bak file from prior to the upload is from Nov 2013, too long ago
    Odd, Zotero creates a backup about daily. Have you not used Zotero since Nov 2013?

    Edit: I should note that it only keeps a single most recent backup.
  • Hi: Thanks again. Here are a couple refinements that might be useful:

    1) Pressing the dash (-) key when the focus is on the trash folder in the left pane in Standalone causes the items in the middle pane to collapse, but it also changes focus to the whole library. I didn't notice that the focus had changed to the whole library when I started deleting, but fortunately did after the first one, and restored those first items to the library. To get the collapse to happen in the Trash folder items, the focus (click) has to be on the base document (not a note) of an item in the trash. Then you can highlight hundreds of items and press delete, and they will slowly be deleted. One way maybe to make the collapse more intuitive would be to put a "super arrowhead" in the Title bar of the middle pane, this might be a logical place to get all of the items in the pane to expand or collapse.

    2) You are right about the backup...I made the wrong assumption that if I had two .bak files, one named zotero.sqlite.1.bak, and the other named zotero.sqlite.76.bak, that the one numbered 76 would be the more recent one...I didn't look at the dates, and 76 was made last Nov 2013 while 1 was made two days ago, before the big upload. Now that I'm into the deletion process I'll just stick with that unless you tell me there is another reason to go back to a "clean" state.

    3) However, I do travel for long periods between Europe and the US, and my zotero database is currently stored on my home computer and synced with your sync servers. If I turn off my home computer and use Zotero when away, syncing with the sync servers, is that OK, or should I move my Zotero files to the NAS device that I have (that is also backed up weekly). I'm planning to do the latter (move to the NAS) unless you tell me otherwise. thanks again.
    3)
  • edited April 24, 2014
    Pressing the dash (-) key when the focus is on the trash folder in the left pane in Standalone causes the items in the middle pane to collapse, but it also changes focus to the whole library.
    I think you're confused here. "-" simply collapses the tree that has focus. ("+" expands it.) If the collections list has focus and you press "-", it will collapse all collections down to the root of the library you're in. The middle pane simply behaves as if you had selected the library root — there's nothing special about "-" in that regard.

    Aurimas was saying to click in the middle pane before pressing "-", which will collapse the items tree. It doesn't matter what kind of item is selected — the only difference is that, if a child item is selected, focus will be lost (since it disappears), whereas if a parent item is selected, it will remain selected.
    You are right about the backup...I made the wrong assumption that if I had two .bak files, one named zotero.sqlite.1.bak, and the other named zotero.sqlite.76.bak, that the one numbered 76 would be the more recent one
    The higher-numbered backups are made before database upgrades. zotero.sqlite.bak and zotero.sqlite.1.bak (and so on, according to settings) are automatic backups made every 24 hours.
    If I turn off my home computer and use Zotero when away, syncing with the sync servers, is that OK, or should I move my Zotero files to the NAS device that I have
    What's your reasoning for that? There's nothing wrong with simply syncing with Zotero from another computer while you're away. When you get home your home computer will pull down all the changes you made in the interim. Just make sure you sync your home computer before you depart.
Sign In or Register to comment.