Export-import creates numerous duplicate subcollections

Usually only two. But sometimes as many as four. Their contents are identical.
  • No, this is a misunderstanding. Export and import will import the exported items as new items. That's it. There's not some unpredictable number of duplicates. It's just importing the items you exported. If you do it multiple times, you'll end up with more duplicates. You don't want to be using export and import into your own library.
  • I only exported once and only imported once. The original file doesn't have the duplicates. Only the, new, file to which I imported does. The idea was and is to create two libraries, because the original was getting unwieldy. I'm using two profiles to achieve this.
  • Wait, you're referring to collections, not items? Can you explain exactly the behavior you're seeing?

    I'm still pretty sure this is some sort of misunderstanding. If you export something from one library as Zotero RDF and import into an empty library, you're going to get what you exported.

    If you haven't synced the second profile, you can test this by closing Zotero, deleting its data directory, and importing again. If you see a duplicate that you don't see in the original library, you can send the RDF file to support@zotero.org with a link to this thread and we can take a look. But I'd be very surprised if you do.
  • Collections. And this is exactly what I did: " If you export something from one library as Zotero RDF and import into an empty library, you're going to get what you exported." And I did get multiple collections. Unfortunately, I deleted them all, so I can't show you a screen shot. But I'll be doing more exports as I clean up my original library, and if it happens again, I'll send the file to support. And, yes, maybe it would be good to set up a third profile with an empty library and do everything over to see what happens.
  • Okay. Well, now I have a real problem. I tried to create a new profile. I put it in a folder named Profiles that contained two older active profiles, each in its own folder. When I created the new profile, I chose the Profile folder as the location for the files associated with the new profile. This was unwise, since apparently I should have created a specific folder for the new profile. It's been awhile since I've created a new profile, and I forgot this.

    What I did next was even more unwise. I deleted the new profile and, regrettably, chose the delete files option. Instead of deleting just the files relating to the newly created profile it deleted them plus the folder for one of the other profiles. Interestingly, it did not delete the folder for the other, far more important, ols profile. Still, since the deleted old profile was the one I populated using the above-describe painful export-import procedure and since it was not backed up and since for whatever reason (size?) the old profile is not in the Recycle Bin, I've lost a lot of work.

    My most pressing problem now, though, is that I can no longer access the remaining old profile. When I start Zotero, all three profiles are offered to me. If I choose the remaining old profile, Zotero opens with an empty Library. I note that the files for that profile appear to remain where they were: the folder is quite large and also I can see the standard Zotero files and file names when I look into it. The folder's size does seem smaller than I recall it to be, though, so maybe some data has in fact been lost. We shall see. I hope.

    My questions now are a) how can I regain access to the remaining old profile's library and b) how can I stop Zotero from offering me profiles that no longer exist?
  • edited January 20, 2021
    Sorry, but you're way outside of support boundaries here.

    I don't even know what you're talking about, honestly — you're creating profile folders manually, without using the Profile Manager? Profiles — and the "Delete Files" option — don't even have anything to do with library data, unless you're also storing the data directory within the profile, in which case, again, you're just so far outside of normal usage that we really can't help with this.

    I'm afraid you're going to have to figure this out on your own. This is just the Firefox profile system — a Profiles folder, a profiles.ini file — so there's really no Zotero-specific information here. The Zotero data directory is a totally separate concept. You can always create a new profile and point it at any data directory.
  • edited January 20, 2021
    Just to remind you what I told you in 2019:
    For what it's worth, I would strongly recommend just using separate group libraries rather than trying to use multiple profiles.
    You seem to have strayed beyond even our documentation on using multiple profiles, so I'm going to have to leave you there.
  • No. I am not creating profile folders manually. I am using the Profile Manager. I created all three profiles using it. The only thing that I did differently this time it seems is that instead of specifying the the new profile should be created in Profiles/New Profile, I specified it to be Profiles. The older profiles were in folders Profiles/Old Profile 1 and Profiles/Old Profile 2. Both worked fine.

    When I realized that Zotero had put all of the files for the new profile in Profiles, I restarted Zotero and deleted the new profile. I selected the delete files option. Zotero then deleted the new profile's files from Profiles as I expected. But it also deleted the Profiles/Old Profile 2 folder, which I did not expect, while leaving the Profiles/Old Profile 1 folder which remains large.

    What is now happening, and I would think should _not_ be happening, is that a) all three profiles are shown in the Profile Manager when I start Zotero. Presumably this should not happen, at least with respect to the new profile, since I used the Profile Manager to delete it. Why the profile corresponding to the deleted profile folder (Profiles/Old Profile 2) also comes up may be because Zotero is unaware that the corresponding folder was deleted. Which makes sense, since the list of profiles was presumably not updated just because the corresponding data folder was blown away. But by the same token, one would expect Zotero to see the remaining old profile (Profiles/Old Profile 1), since nothing was changed in the path to it.

    Putting that aside, although it is troubling, what I really need to be able to do now is to get access to Profiles/Old Profile 1, either through the current Profile Manager entry or some other way. If I find that the current contents of that folder are corrupt, I'll restore them from a backup (which I have for that folder).
  • I would strongly advise against using a custom location — you shouldn’t do anything when creating a new profile other than type a name and press Return.

    (Firefox's profile documentation also includes this line: "Warning: If you choose your own folder location for the profile, select a new or empty folder. If you choose a folder that isn't empty and you later remove the profile and choose the "Delete Files" option, everything inside that folder will be deleted.")

    In any case, the list of profiles just comes from profiles.ini, so you'd have to look at that file to debug this.

    But again, none of this should affect your Zotero data directory unless you actually moved your data directory within the profile folder. The profile just contains basic settings, including the path to the data directory. Deleting a profile, and even choosing Delete Files, doesn't delete your data unless you did something very unusual and undocumented.
  • edited January 22, 2021
    Your help is much appreciated.

    Re what I should have done for a new profile. Yup. Absolutely right. Sigh. I thought that I was specifying the location of the data file, not of the profile itself. Long days and nights contributed, but thoughtlessness was the root cause. I should have known better.

    I think I've gotten everything sorted. The data is intact. I've just created new profiles and used Preferences to point them to the right folders.

  • Okay, back to the original topic. I've replicated my duplicates problem. I have screenshots of the original collection I exported (which had no duplicates), the import of that collection (with duplicates) and the .rdf file (which shows duplicates). How can I send them to you?
  • You can send them to support@zotero.org with a link to this thread.
  • Okay. Will do. Tks.
  • If you can reproduce this, can you share the zotero.sqlite file that was used to export the RDF file containing the duplicate collections?

    (Any further details need to be posted here, not via email. The email address is only for sending files or private information. This is where support happens.)
  • No problem. But how do I share the zotero.sqlite file if not via email?
  • Via email — as I say, that’s what the email address is for.
  • Thanks very much. I've pushed out an updated Zotero RDF translator that should fix this. Your Zotero should have already auto-updated to the new translator, or you can update manually by clicking Update Translators in the Advanced pane of the Zotero preferences.

    (The real bug here was in Zotero, so I've also fixed this properly for Zotero 5.0.96.)
  • Many thanks!
Sign In or Register to comment.