diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 80f96a51b5..6193d67c0c 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -1763,7 +1763,7 @@ Zotero.Item.prototype.save = function() { if (this._previousData) { var oldSourceItemKey = this._previousData.sourceItemKey; if (oldSourceItemKey) { - var oldSourceItem = Zotero.Items.getByKey(this.libraryID, oldSourceItemKey); + var oldSourceItem = Zotero.Items.getByLibraryAndKey(this.libraryID, oldSourceItemKey); } if (oldSourceItem) { var oldSourceItemNotifierData = {}; diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index 870145cabc..583f41dfde 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -1720,6 +1720,15 @@ Zotero.Sync.Server = new function () { Zotero.Sync.Runner.setError(e.message ? e.message : e); Zotero.Sync.Runner.reset(); + try { + undefinedFunction(); + } + catch (e) { + // Log stack trace to error console + if (e.stack) { + Components.utils.reportError(e.stack.substr(0, 600)); + } + } Components.utils.reportError(e); } }