subfolders not summing to total items in library

report ID: 333207124

I don't know if this is the cause or not - a red stop sign appears next to my sync icon, and when I click it it gives this report ID and instructs to post to the forum and describe the issue.

I'm having a couple of issues right now:

1. (already submitted this to the forum): when I import files I will sometimes get a notification when the import has completed that X# of items were imported, but when I look in the folder the total number of records in that view are lesser than they should be. If I delete the collection and all items and retry, I will eventually get the correct number.

2. I've checked all of the numbers in each collection of a group library and they don't sum to the library total (library total is a 13413, total based in what's in all of the subfolders should be 15827).

Many thanks!

MacOS 10.15.7
Zotero 5.0.95.3
  • Collections aren't folders: The same item can be in multiple collections, so having the sum of items be higher than the sum of total items is normal.

    About the red stop sign -- which is a sync failure -- what exactly does it say when you click? It should give you more than an error report.

    Let's keep the import item in its original thread.

  • @kj30: For the sync error, in addition to telling us what it says when you click on it, can you provide a Debug ID (different from a Report ID) for a sync attempt that causes the error?

    After that, if you haven't yet, you should try restarting Zotero.
  • Thanks Adam!

    So the duplicates aren't counted as separate files before they are "resolved"? As it stands now:
    Group Library: 13413
    Sum of Collections (what I meant by folders): 15827
    Duplicates: 10207

    I'm sure I confused things by not mentioning it is a group library.

    I'm going to walk away for this for a while. It doesn't make sense to me that the standalone numbers would be affected, but I'm wondering if it just needs to have more time to sync (this all happened within a couple hours of importing). My impatience stems from a systematic review group raring to get started, but I can put the brakes on for now.
  • It has nothing to do with syncing or with duplicates. There's just no connection between the number of items in the library root and the number of items in collections. The library root shows you all the items in your library. If you have one item in your library and drag it to two collections, the sum of the two collections would be two, but you still only have one item in your library.
  • Those are different things:
    - Duplicates are two (or more) items that Zotero believes refer to the same publication. They are counted as two (or more) items
    - The same one item can be simultaneously in multiple collections (see https://www.zotero.org/support/collections_and_tags#the_zotero_collections_model ) . It's still one single item -- e.g. if you modify it in one collection, it's modified in every collection -- but it would of course get counted multiple times as you sum up items in collections because it's getting counted once for every collection it's in.
  • Thank you for your continued help with this.

    Once I came back to it, everything is correct. All of the collections/"subfolders" still show the correct number of records, and they total to the number in the group library.

    Many thanks!

  • edited February 17, 2021
    It still sounds like you're misunderstanding this. Again, the total of items in collections has absolutely no connection to the number of items in the library root. If you happen to add each item to only one and only one collection, and you leave no items unfiled, the total would be the same, but that would be a fluke of your particular Zotero library. You should have no expectation that those numbers would have anything to do with one another, and it's in no way more "correct" for them to be the same — if anything, it suggests that you're using Zotero in a much more rigid way than is necessary.
  • You may be right. It has always worked out that way for me, though. As an example:

    I create a Group Library

    I import files from multiple databases, and as I import them I have "place imported collections and items into a new collection" toggled.

    Each database has then created its own collection.

    So maybe Biosis has 500 records, PubMed has 500 records, and Web of Science has 500 records. So three collections within the group library, each with 500

    The full Group library shows 1500 records

    There are inevitably duplicates, so you see some number of records in the Duplicates folder.

    Once I deduplicate, each collection shows the original number (so 500 for each), but the full library may then show 450.

    I understand that the same record can exist in more than one collection, and that that differs from duplicates. Maybe I am misunderstanding what you are describing.

    In any case, the numbers changed after I left them for some time, and now reflect the scenario I describe above.

    I truly appreciate your help!
  • Yes, the above all sounds correct. When you originally import into separate collections, they add up. When you start deduplicating, the library count goes down, the collection count stays exactly the same.
  • You may be right.
    @kj30: If you're going to post here, you'll need to accept that we know what we're talking about. If you don't understand it, then ask for clarification, but don't suggest that we're confused about the software that we create.
    It has always worked out that way for me, though.
    Your own example ends with the collection totals not equaling the library root total, so no, it has not always worked out that way for you.

    As I say, if each item exists in one and only one collection, and no items are unfiled, the collection totals will add up to the number of items in the library root. That's the situation you start out with if you import items into separate collections.

    But if you add the same item to multiple collections, the numbers won't add up. If you take a single item in the library root and add it to another collection, the collections would add up to the library root total + 1. If you remove an item from a collection, or if you deduplicate two items (which moves one to the trash and leaves the other in both collections), they would add up to the library root total - 1. In a normal Zotero library, items will often exist in multiple collections, so the total of items in collections will generally be higher than the library root.

    And the numbers here don't just change if you leave them, unless you're pulling down data via a sync or an import is ongoing, so that's some sort of misunderstanding. They would change if you do things to your library, like deduplicating items, but they're always up to date otherwise.
  • I meant no disrespect! I think I just communicated poorly someplace, we’re saying the same thing.
Sign In or Register to comment.