Opened 6 years ago

#1746 new defect

deleting an item before Zotero.Attachments.importFromDocument() or Zotero.Attachments.*FromURL() completes causes fatal error

Reported by: simon Owned by: dstillman
Priority: major Milestone: 2.1 Final
Component: data layer Version: 2.1
Keywords: Cc:

Description

Presumably, the event listener should check that the item still exists before trying to attach the attachment.

[JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageStatement.execute]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://zotero/content/xpcom/db.js :: anonymous :: line 139" data: no] [QUERY: INSERT INTO itemAttachments (itemID, sourceItemID, linkMode, mimeType, charsetID, path, syncState) VALUES (?,?,?,?,?,?,?)] [ERROR: insert on table "itemAttachments" violates foreign key constraint "fki_itemAttachments_sourceItemID_items_sourceItemID"]"]

Change History (0)

Note: See TracTickets for help on using tickets.