From f7a6464f82422aada04f88204cdc26918182573a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Wed, 13 Jul 2016 13:49:46 +0300 Subject: [PATCH] Use feed item links for guid if id unavailable --- chrome/content/zotero/xpcom/feedReader.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/feedReader.js b/chrome/content/zotero/xpcom/feedReader.js index 13c03d566d..167b71be72 100644 --- a/chrome/content/zotero/xpcom/feedReader.js +++ b/chrome/content/zotero/xpcom/feedReader.js @@ -360,13 +360,14 @@ Zotero.FeedReader._processCreators = function(feedEntry, field, role) { Zotero.FeedReader._getFeedItem = function(feedEntry, feedInfo) { // ID is not required, but most feeds have these and we have to rely on them // to handle updating properly - if (!feedEntry.id) { - Zotero.debug("FeedReader: Feed item missing an ID"); + // Can probably fall back to links on missing id - unlikely to change + if (!feedEntry.id && !feedEntry.link) { + Zotero.debug("FeedReader: Feed item missing an ID or link - discarding"); return; } let item = { - guid: feedEntry.id + guid: feedEntry.id || feedEntry.link.spec }; if (feedEntry.title) item.title = Zotero.FeedReader._getRichText(feedEntry.title, 'title');