WARNING: Data loss when exporting collections

edited August 14, 2022
Beware when you want to export a collection from one library and reimport it into another library!

When a collection is exported, only entries/items with a meta-data wrapper are exported. Simple files (i.e. PDFs or emails) in a collection are NOT exported and thus lost!
  • The problem was on import, not export — standalone attachments weren't reimported properly. I've fixed this in the latest Zotero beta. Thanks for reporting.
  • @dstillman

    I downloaded and installed the latest Zotero beta.
    Exporting and reimporting still doesn't work properly.
    The export does contain all the files, including standalone attachments; but the import is still missing the standalone files.

    There seems to be a misunderstanding what I meant by 'reimporting':

    This DOES work:

    My Library - (export)-> FileSystem - (reimport) -> My Library

    This DOES NOT work:

    My Library - (export)-> FileSystem - (reimport) -> a group library.

    (BTW: How could I attach a zip file of the exported collection?)
  • The export does contain all the files, including standalone attachments; but the import is still missing the standalone files.
    First, to clarify, your library has "items" and "files". Items, including attachment items, are the things in the middle pane of Zotero. Files are the things on disk that you open (e.g., PDFs). You'll want to be specific about what you're referring to.

    In any case, the main bug here with standalone attachments not being properly imported was fixed, and it had nothing to do with which library you were importing into. Note that one of your group libraries doesn't allow file editing by non-admins, and you're not an admin. If that's the library you're importing into, this isn't going to work.

    If you think it's not that, we'd need a more specific description of the problem — see Steps to Reproduce for the kind of description we need. If you want to share a file, you can send it to support@zotero.org with a link to this thread.
  • edited August 15, 2022
    Report ID: 1331027801

    I just sent a step-by-step description of my actions to reproduce the error (with pictures and a zip file of a test collection).

    For the casual reader: Added after dstillman's comment below (sorry, don't know how to add pictures here):

    I created a brand new private group 'Sandbox' (Reading, Editing, and File Editing allowed by any group member).

    Then I disabled syncing, because I want to keep the data locally only.

    In My Library, I created a new collection (_TEST) an inserted four items, two standalone items and two regular 'Web Page' items, one without and one with an attachment (see fig 1).

    Then I exported the collection _TEST to the file system (see fig 2). The collection is in the attached file _TEST.zip

    Then I selected the group library (Sandbox), chose File -> Import (see fig 3), selected the exported file (fig 4), set the import options (fig 5), and started the import.

    The result (fig 6) shows that the standalone items are missing.

    The errors reported are in Report ID: 1331027801.
  • (Please always post your full reply here. The email address is solely for sending private files and information.)

    The problem fixed above was specific to standalone attachments with URLs. You were also testing originally (assuming you were using the previous "Sandbox" group) with a library that didn't allow file editing for your member role, so no file imports would've worked.

    Your latest report, in a new library with correct file-editing settings, was a separate problem with attachments without URLs. The files were being imported into the wrong library. You'll probably see those attachments if you look in the root of My Library.

    That should be fixed now in the latest beta.
  • edited August 14, 2022
    Verified! I updated to the latest beta, and now everything gets imported correctly. No items are missing!

    But I don't understand: Why should I, as a user, care if a standalone item has attachements with or without URLs? After all, as I understand it, you can put any kind of file as a standalone item into a collection? Once an item is within (aka copied into) the Zotero storage it shouldn't matter where it came from (Web, manually inserted, file system, whatever).

    And yes, before the latest beta, the files were imported into the wrong library (in this case: My Library) as duplicate items.

    Anyway, thanks for the fast response and fix - quite unusual nowadays!
  • But I don't understand: Why should I, as a user, care if a standalone item has attachements with or without URLs?
    I don’t know what you’re saying here. I was just explaining that there were two separate bugs.

    Anyway, thanks for reporting this.
Sign In or Register to comment.