Cannot save from SAE International website
I am having trouble saving citations from the SAE website (http://www.sae.org/). Hovering the mouse pointer over the Firefox addressbar icon shows the correct translator being used (SAE International). But when clicked, it gives the generic 'Could not save item' error.
I have tried all the seven steps described to troubleshoot translator issues form the relevant resource on the Zotero website at http://www.zotero.org/documentation/troubleshooting_translator_issues
I am using Firefox 3.0.1 with Zotero 1.0.7, which are both currently the latest respective versions.
Please help.
Regards,
ViHAR.
I have tried all the seven steps described to troubleshoot translator issues form the relevant resource on the Zotero website at http://www.zotero.org/documentation/troubleshooting_translator_issues
I am using Firefox 3.0.1 with Zotero 1.0.7, which are both currently the latest respective versions.
Please help.
Regards,
ViHAR.
Please post a link.
(2)(+0000000): Translate: Translation using SAE International failed:
message => doc.evaluate("//p[strong[contains(text(), \"ISBN\")]]", doc, null, XPathResult.ANY_TYPE, null).iterateNext() is null
fileName => chrome://zotero/content/xpcom/translate.js
lineNumber => 854
stack => ([object XPCNativeWrapper])@chrome://zotero/content/xpcom/translate.js:854
name => TypeError
url => http://www.sae.org/technical/papers/970866
downloadAssociatedFiles => false
automaticSnapshots => true
I've found the problem and have a solution. The following line of SAE International.js:
if (type == "paper") {
should read:
if (type == "conferencePaper") {
It's unclear from the docs what the proper way to submit this fix is, so I'm posting it here in the hopes that devs will find and fix, and in the meantime the above posters can fix their local copies themselves. (SAE International.js is under your FIrefox profile directory in zotero\translators\)
Cheers.
For everyone else, 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 prefs.
http://www.sae.org/technical/papers/2010-01-0907
I don't know if it's relevant that this paper is not published yet.
(3)(+0000195): Translate: Could not find a result using CrossRef:
message => refXML is undefined
fileName => chrome://zotero/content/xpcom/translate.js
lineNumber => 948
stack => processCrossRef("\n<doi_records xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-insta
..............
nixref")@chrome://zotero/content/xpcom/translate.js:1024
name => TypeError
url => undefined
downloadAssociatedFiles => false
automaticSnapshots => true
Can anybody help, or give me a tip where in the code I could have a look to fix that?
The DOI route will not let us save the report abstracts, so if that is important, please let me know. It would also be possible to create a hybrid translator that pulled most of its data from the DOI lookup service (CrossRef) and added addition data like abstracts. It also won't do automatic PDF saving, but since the PDFs at SAE are paid downloads, that might not be possible anyway.
The currently broken code for the SAE translator is in "SAE International.js" in the same directory.
For my self the CrossRef output is already all I need. The abstract would be just a bonus.
I will have a look on it later on, but I'm not really involved in Zotero Dev. Is there anybody around who could do that quickly?
Why does CrossRef.js not appear in Scaffold?
I started of in CrossRef.js with...
} else if(xml.doi_record[0].crossref.report-paper.length()) {
var item = new Zotero.Item("journalArticle");
var itemXML = xml.doi_record.crossref.report-paper;
var refXML = itemXML.report-paper_article;
var metadataXML = itemXML.report-paper_metadata;
//item.DOI = refXML.doi_data.doi.toString();
item.DOI = itemXML.report-paper_metadata.DOI.toString();
item.publicationTitle = itemXML.report-paper_metadata.full_title.toString();
item.volume = itemXML.journal_issue.journal_volume.volume.toString();
item.issue = itemXML.journal_issue.issue.toString();
}
But I even can't see if it is actually executed.
HELP :)
Then try again. You may have to restart Firefox for it to take effect, I don't remember.
I still had some issues, for those that have the same problem:
Issue #1: E4X dowsn't seem to like the "-" in "report-paper", but I fixed that by adding this in line 30:
xmlOutput = xmlOutput.replace(/report[^>]*paper/g, "reportpaper");
Issue #2:
in the added code "item" should be "Item" (capital i) and rNum made problems so the added code looks like this now:
} else if(xml.doi_record[0].crossref.reportpaper.length()) {
// Report Paper
// Example: doi: 10.4271/2010-01-0907
// http://www.crossref.org/openurl/?pid=zter:zter321&url_ver=Z39.88-2004&ctx_ver=Z39.88-2004&rft_id=info%3Adoi/10.4271/2010-01-0907&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&noredirect=true&format=unixref
var itemXML = xml.doi_record[0].crossref.reportpaper;
var refXML = itemXML.reportpaper_metadata;
var metadataXML = itemXML.reportpaper_metadata;
var item = new Zotero.Item("report");
if (metadataXML.publisher_item.item_number.toString() )
item.reportNumber = metadataXML.publisher_item.item_number.toString();
item.institution = metadataXML.publisher.publisher_name.toString();
item.place = metadataXML.publisher.publisher_place.toString();
I'll look into adding this to the CrossRef.js that ships with Zotero. Do you know of any other publishers that assign DOIs to items of type report-paper? I'd like to test it with non-SAE DOIs if possible.
So far I haven't seen any report-paper types. But it looks like I am gonna use Zotero for the next 3 years, so I can let you know if I find something.
I would say its still worth to ship it with Zotero. SAE is quite a big database for automotive and aerospace. Thing is I've changed my CrossRef.js already to have the the items as Journal Article. I don't know how the mass would like it best.
Since I'm confident that this will have no negative impact on DOIs for items not of type report-paper, this can certainly go into the Zotero trunk even without non-SAE examples. I was mainly interested in further refining processing of report-paper from the start, if possible.
I get the following in my error console:
DOI Translator: could not find DOI
I poked around a bit, but could not find a solution. Any help is appreciated.
CrossRef from here:
https://github.com/ajlyon/zotero-bits/raw/85c2196e2e4f66bb8bececb4392311f4c726a899/CrossRef.js
Edited replacing
} else if(xml.doi_record[0].crossref["report-paper"]length()) {
with
} else if(xml.doi_record[0].crossref["report-paper"].length()) {
(Note the dot.) Can this fix (including the rest of the report-paper type block) be incorporated into the official CrossRef.js? Also, It'd be nice if the SAE specific translator were fixed.
This is now fixed on Github and in the Zotero trunk.
Maybe some day down the line I'll get the motivation/time to fix the SAE translator myself. Or the SAE site admins will get smart and allow exporting of references...