From dbf6bc0ee1fb216953be43176011f93627ca2208 Mon Sep 17 00:00:00 2001 From: aurimasv Date: Sun, 17 Mar 2013 02:38:38 -0500 Subject: [PATCH 1/3] Don't attempt to mark changes when creating new item. --- chrome/content/zotero/xpcom/data/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 2abc9cdf7..a0307e74e 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -590,7 +590,7 @@ Zotero.Item.prototype.setType = function(itemTypeID, loadIn) { if (loadIn) { this._itemDataLoaded = false; } - else { + else if(oldItemTypeID) { this._markFieldChange('itemType', Zotero.ItemTypes.getName(oldItemTypeID)); if (!this._changedPrimaryData) { this._changedPrimaryData = {}; From d974c78cef27f8ab87a712e6e567755af9a93fdf Mon Sep 17 00:00:00 2001 From: aurimasv Date: Sun, 17 Mar 2013 02:39:26 -0500 Subject: [PATCH 2/3] Add $rdf.log.error for rdflib.js --- chrome/content/zotero/xpcom/rdf/init.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/rdf/init.js b/chrome/content/zotero/xpcom/rdf/init.js index c92275d23..c3e063057 100644 --- a/chrome/content/zotero/xpcom/rdf/init.js +++ b/chrome/content/zotero/xpcom/rdf/init.js @@ -19,7 +19,8 @@ var $rdf = { }, log: { debug: Zotero.debug, - warn: Zotero.debug + warn: Zotero.debug, + error: Zotero.debug } }; From f3bda1643dd8dcf7af3a0fb22a2bb981ae6b5087 Mon Sep 17 00:00:00 2001 From: aurimasv Date: Sun, 17 Mar 2013 02:40:34 -0500 Subject: [PATCH 3/3] Normalize DOM nodes after parsing --- chrome/content/zotero/xpcom/translation/translate.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 38b9f5da2..dba25677d 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -2258,6 +2258,8 @@ Zotero.Translate.IO = { throw "DOMParser error: loading data into data store failed"; } + nodes.normalize(); + return nodes; },