Duplicate resolving does not work (827026862)

I am running Zotero trunk from SVN. When I click on "Merge items" on the duplicates list, nothing happens. Then when I navigate elsewhere, I get "An error has occured. Please restart Firefox"

The error report ID is 827026862
  • The javascript console gives the following error message

    Error: uncaught exception: [Exception... "Component returned failure code: 0x80630003 (NS_ERROR_STORAGE_CONSTRAINT) [mozIStorageStatement.execute]" nsresult: "0x80630003 (NS_ERROR_STORAGE_CONSTRAINT)" location: "JS frame :: chrome://zotero/content/xpcom/db.js :: :: line 140" data: no] [QUERY: INSERT INTO relations (libraryID, subject, predicate, object, clientDateModified) VALUES (?, ?, ?, ?, ?)] [ERROR: columns subject, predicate, object are not unique]

    I did another run with debug level set to 5 and pasted the results here http://www.heypasteit.com/clip/00B4

    It looks like the items are already marked as duplicates, but for some reason still exist as separate entities in the database. This is a group library and I have previously deleted these duplicates using another firefox profile. So it seems that it is possible to sync the information about which items are duplicates but retain the duplicates nevertheless.
  • It looks like the items are already marked as duplicates, but for some reason still exist as separate entities in the database.
    What makes you say that? An error during merging of duplicates should cause the entire operation to fail.
    This is a group library and I have previously deleted these duplicates using another firefox profile. So it seems that it is possible to sync the information about which items are duplicates but retain the duplicates nevertheless.
    I don't really understand what you're saying here.

    Can you reproduce this reliably? And despite your description above, presumably this only happens for some items, right?
  • What makes you say that? An error during merging of duplicates should cause the entire operation to fail.
    Moved the log to http://codepad.org/f9xd7NVA to get line numbers. On line 1558 and forwards Zotero tries to do a database operation to mark the items as duplicates. This fails because the entry that these items are duplicates already exist on the server.

    I did not test all items in the duplicate list, but for the couple that I tested, the duplicate removal did not work. But this is probably because I had already removed the duplicates before using another account.

    I will try to reproduce this now with a clean group library.
  • OK. No need to try to interpret the debug output—it really just makes things more confusing. A simple bug report is sufficient.
  • Before being able to reprodude this, I noticed the following behavior that I can reproduce

    -Start with an empty group library that is shared between Account 1 and Account 2.
    -Using Account 1, import this item http://www.jstor.org/stable/2095483 (probably any item will do. This one has an attachment.)
    -Duplicate the item, sync, remove duplicates, and sync
    -Switch to Account 2
    -Sync

    Now there are two copies of the item, where as there should be only one

    -Remove duplicates and sync
    -Switch to Account 1 and sync

    The already removed duplicate reappears

    Since this can be related to the original possible bug, I did not test any further. (Except that I could reproduce this.)

    The link to the library is http://www.zotero.org/groups/52404/
  • OK, duplicate detection didn't work properly in group libraries—it moved items to the trash rather than deleting them, but there was no trash, so they just disappeared until something (such as an attempted duplicate merge on the other side) caused them to be modified, at which point they reappeared.

    Rather than have it delete group items, I decided to add trash to groups.

    I can't reproduce that constraint error, but I suspect it was indeed related to this (and possibly fixed going forward due to another recent fix). Let us know if you still get it after emptying the trash in the group libraries.
Sign In or Register to comment.