Problems with PubMed Site Translators
Yesterday when trialing Zotero 1.5 Sync. I was able to (down)load both single files and Folders into Zotero 1.5 from PubMed. However today (22Nov) when I click the folders download option in a PubMed search I keep getting a "Could not save item ... check know translator issues' I went through the translator issues, and checked and changed the points as detailed, but these did not resolve this issue.
the URL is
http://www.ncbi.nlm.nih.gov/sites/entrez
Any suggestions
the URL is
http://www.ncbi.nlm.nih.gov/sites/entrez
Any suggestions
To reproduce:
Just go pubmed and try to "save to zotero" - Zotero will complain of a translator error.
http://www.ncbi.nlm.nih.gov/sites/entrez
Report Id: 252415006
[JavaScript Error: "Cannot add invalid tag 2 in Zotero.Item.addTagByID()" {file: "file:///C:/Documents%20and%20Settings/delenca/Application%20Data/Mozilla/Firefox/Profiles/cnhzfpsj.default/zotero/translators/NCBI%20PubMed.js" line: 0}]
Report ID: 1777493063
[JavaScript Error: "Cannot add invalid tag 2 in Zotero.Item.addTagByID()" {file: "file:///C:/Documents%20and%20Settings/delenca/Application%20Data/Mozilla/Firefox/Profiles/hdaopzub.default/zotero/translators/NCBI%20PubMed.js" line: 0}]
To reproduce:
Just go pubmed and try to "save to zotero" - Zotero will complain of a translator error.
http://www.ncbi.nlm.nih.gov/sites/entrez
Thanks, I had missed that. I believe it got fixed at some point in my Sync Preview edition. And, as an FYI, the problem is not getting fixed by restarting firefox.
Thanks,
-Alex
Thanks to Rintze for the patch.
for (var j in pageRange) {
var pageRangeStart = pageRange[j].match(/^\d+/)[0];
var pageRangeEnd = pageRange[j].match(/\d+$/)[0];
if (pageRangeStart.length > pageRangeEnd.length) {
pageRangeEnd = pageRangeStart.substring(0,pageRangeStart.length-pageRangeEnd.length) + pageRangeEnd;
fullPageRange = fullPageRange.replace(pageRange[j],pageRangeStart+"-"+pageRangeEnd); }
}
This piece of code originally uses the variable "i" which has been declared earlier to keep track of the different XML entries. In most cases the page range will be continuous. This results in variable pageRange having only a single property, which resets i to 1, hence the infinite looping. Using "j" solves the problem.
http://zotero-dev.googlegroups.com/web/NCBI PubMed mea culpa.patch
Oooops ! ;-)
Nevertheless, I carried on, importing entries one by one, and at the end of the course, the students said they were quite impressed by Zotero :-)
PS : will the fix for this bug be available for download later this week?
Best regards,
JHM
"We have fixed this translator issue. Your copy of Zotero should auto-update within 24 hours, or you can update manually by clicking "Update Now" in the General pane of the Zotero preferences."
I appreciate that !