[5.0 Beta] Missing item attachments

I was looking for the PDF of an article that I was sure I had, but it did not appear under the item in the center pane. The only things under the item were two word documents for supplementary data. I though that I must be mistaken so I downloaded the article again. When I attached the PDF (drag and drop) to the item, the original PDF re-appeared (now 2 PDFs of the article). Again, I though that this was just me stuffing things up so I forgot about it.

But it has happened again. If I do an advanced search for the PDF (Title contains ...) the PDF shows up as I start to type the title but it can not be seen under the item in the advanced search results pane. This is also the case for at least one other completely unrelated item. I can find it in advanced search but it does not appear under the item.

The files are referenced in the SQLite database (itemAttachments) and I can find them if I do a search in Windows Explorer. In both these circumstances there is more than one file attached to an item.

Ver: 5.0-beta.216+444d77958
OS: Windows 7
Debug ID: D1093610640
Report ID: 1384062127
  • Collapsing and expanding the item doesn't make them reappear? I.e. this isn't just a temporary display glitch?
  • mc
    edited June 20, 2017
    No, collapsing and expanding does nothing. I did think it was a temporary thing but now not so sure.

    I tried with a new Zotero profile and on Windows 10 with the same result.
  • If you restart Zotero, do they reappear?

    It's obviously a bug either way, but it seems pretty clearly just a display glitch if they're reappearing when you add other attachments.
  • No, re-starting has no effect.
  • And you're sure these aren't attachments in the trash?
  • Absolutely. I have emptied the trash just in case. Same result.
  • What happens if you paste the folder name (8-character random string) into the Zotero search bar in All Fields & Tags mode from the library root?
  • Also, you should check your database integrity from the Advanced → Files and Folders pane of the Zotero preferences.
  • If I paste in the 8-character string for the folder with the missing PDF, the item appears and expands but does not display the PDF. It does display the Word documents.

    I ran the database integrity check, and there were no errors. I also vacuumed the database, still the same problem.
  • Can you provide a Debug ID for searching for the 8-char string?

    Have you made manual changes to your database via SQLite or used a plugin that writes to the database?
  • I also have a saved search that finds books with PDF attachments. If I expand all these items, at least 10 of the results (out of 240 items) show up without displaying the attached PDF, but showing other files attached (in some cases up to 10 files attached and a mix of PDFs, Word documents, ePubs). I do not know if the problem is restricted to PDFs, its just that is the easiest experiment with and where I noticed the problem first.
  • The debug ID for the 8-character search is: D428178390.

    I have made no manual changes to the database. I have used Zotfile but currently it is disabled so that I can make sure it is not a Zotfile problem.
  • I did an advanced search for Attachment File Type is Document. I can confirm that it is not just PDFs that are not showing up.
  • If you go to the library root and press "+" in the items tree and then select all items, how does the count in the right-hand pane compare to SELECT COUNT(*) FROM items WHERE libraryID=1 AND itemID NOT IN (SELECT itemID FROM deletedItems);?
  • Selecting all items, the count is: 7,198
    Using the command: 7,471
  • Hmm. OK, and how about total collapsed items compared to SELECT COUNT(*) FROM items WHERE libraryID=1 AND itemID NOT IN (SELECT itemID FROM deletedItems) AND itemID NOT IN (SELECT itemID FROM itemAttachments WHERE parentItemID IS NOT NULL) AND itemID NOT IN (SELECT itemID FROM itemNotes WHERE parentItemID IS NOT NULL);?
  • Total collapsed items: 4,142
    Using command: 4,142.
  • And just to confirm, this is with the trash empty? (I realized those commands don't properly account for child items of items in the trash.)
  • Yes, trash is definitely empty.
  • We're not able to reproduce this with any existing databases we have.

    One thing you could do, after making sure that auto-sync is disabled and that you've backed up your data directory, is delete all other items in the database, empty the trash, and, if the problem still occurs, upload it to the DB Repair Tool and post the Upload ID here so that we can take a look. If it doesn't happen after deleting all other items, you can see what the smallest set of items is that demonstrates the problem. (You're also welcome to just upload your full database, but a smaller set is fine if you prefer.) You can then restore your database from the backup.
  • I uploaded the full database: Upload ID 594a3eb8a11fe.
    I downloaded the repaired database, still the same problem.
    I deleted 2,000 items the problem still exists.
  • Perfect, thanks — this should be fixed in build 218.
  • Build 218 seems to have fixed the issue. Many thanks for your help.
Sign In or Register to comment.