Incorrect count of sub-items

http://picasaweb.google.com/andrew.j.moylan/ZoteroScreenshots?authkey=wiw-HFb_92o

In that screenshot, two of the items have been expanded to illustrate that they have a number of sub-items that is different to the count listed in the third column.
  • Do these incorrect counts persist when you restart Firefox?

    Do you by any chance have the sqlite3 command-line client installed (or would you be able to install it)?
  • edited March 29, 2007
    They do persist.

    I will happily install the client. I'll do it now by Googling for it and following whatever looks like default instructions. Let me know if that's not the right way to go about it for Zotero.

    ----

    Update:
    I acquired sqlite3.exe, put it somewhere, and added that somewhere to my PATH environment variable. Fire away.
  • edited March 29, 2007
    Thanks, Andrew.

    1. Change to the Zotero data directory and run sqlite3.exe zotero.sqlite

    2. Run the following commands:

    SELECT * FROM itemNotes WHERE sourceItemID=(SELECT itemID FROM itemData NATURAL JOIN itemDataValues WHERE fieldID=110 AND value LIKE "Some theoretical aspects%");

    SELECT * FROM itemAttachments WHERE sourceItemID=(SELECT itemID FROM itemData NATURAL JOIN itemDataValues WHERE fieldID=110 AND value LIKE "Some theoretical aspects%");

    These statements will display the notes and attachments that have the Evans article as a parent in the database. Theoretically there should be one line in each.
  • http://picasaweb.google.com/andrew.j.moylan/ZoteroScreenshots/photo?authkey=wiw-HFb_92o#5047329102140169122

    Apparently older versions of the note are persisting and are related to the problem. See 1. the interesting new screenshot above, and 2. the results of those queries, below.

    C:\Data\Science\Zotero>sqlite3.exe zotero.sqlite
    SQLite version 3.3.13
    Enter ".help" for instructions
    sqlite> SELECT * FROM itemNotes WHERE sourceItemID=(SELECT itemID FROM itemData
    NATURAL JOIN itemDataValues WHERE fieldID=110 AND value LIKE "Some theoretical a
    spects%");
    11095|1416|Discussion of accuracy of methods
    Discussion of Levin-type methods.|1416|11095
    Discussion of Levin-type methods, showing equivalence of a couple of ways of for
    mulating them.|1416|11095
    Discussion of Levin-type methods, showing equivalence of a couple of ways of for
    mulating them. Discusses|1416|11095
    Discussion of Levin-type methods, showing equivalence of a couple of ways of for
    mulating them. Discusses accuracy issues.|1416|11095
    sqlite> SELECT * FROM itemAttachments WHERE sourceItemID=(SELECT itemID FROM ite
    mData NATURAL JOIN itemDataValues WHERE fieldID=110 AND value LIKE "Some theoret
    ical aspects%");
    14046|1416|1|application/pdf|1|14046/science|
    sqlite>
  • OK, thanks Andrew. This was a potentially serious bug, now fixed and pushed as 1.0.0b4.r2.

    Thanks very much for your help identifying and investigating the problem.
  • Fast work Dan.

    I don't like the look of those duplicated IDs... Do I need to do anything with my database before updating Zotero?
  • The update will repair those entries, transferring the longest version of each note back into the proper field and deleting the rest.

    As always before any update, I'd recommend making a backup just to be safe.
  • Yup Ok I was thinking keeping the longest of any duplicates would be a reasonable course of action.
  • Confirmaton: 1.0.0b4.r2 solves problem.
This discussion has been closed.