[Report ID : 1747181546] MODS import via Unapi no longer working in Zotero 2.1.2

We have developped a bibliographic application which generates records in MODS format via unapi : http://elearning.unifr.ch/bibup/index.php. With Zotero 2.0.9, this was working fine, references could be imported correctly. However, with Zotero 2.1.2 (Firefox 3.6.16 on Mac), it no longer works. For a single record, the Zotero icon doesn't appear, and for multiple records, clicking on "Save to Zotero" brings a "Could not save to Zotero" error message.

Interestingly, generating a reference manually (e.g. http://elearning.unifr.ch/bibup/unapi.php?id=98&format=mods) and importing it in Zotero via the clipboard still works, so the MODS format we generate should be correct (btw. : our unapi server validates without errors or warnings at http://validator.unapi.info/).

Any hint on what could be wrong ? I tried looking at the debug output from Zotero, but couldn't find anything.

Thanks,
Jacques

EDIT : an error in unapid.js is reported (see report ID 1747181546)
  • After some additional investigations, it seems that Zotera gives an error when a reference contains attachments. If I remove the following lines from a MODS record, everything works fine :
    <location>
    <url displayLabel="Electronic full text" access="raw object">http://elearning.unifr.ch/bibup/uploads/130164902313/130164902313extrait.jpg</url>;
    </location>

    In the previous version of Zotero (2.0.9), this worked perfectly.

    Here is also the output from the Zotero debugger :
    (4)(+0000002): Translate: Parsing code for MODS
    (3)(+0000004): Translate: Beginning translation with MODS
    (3)(+0000002): Translate: Saving item
    (5)(+0000000): Translate: running handler 0 for itemDone
    (2)(+0000000): Translate: Detect using unAPI failed:
    message => is not a function
    fileName =>
    lineNumber => 0
    stack => SJOWContentBoundary()@:0
    name => TypeError
    url => http://nte.unifr.ch/blog/2011/04/04/presentation-de-bibup-a-rero/
    downloadAssociatedFiles => true
    automaticSnapshots => true

    The problem also happens on others servers providing references with attachemnts via unapi, e.g. http://arc.nucapt.northwestern.edu/refbase/show.php?record=10000
  • This is fixed in Zotero 2.1.4-- there was a problem with attachments in 2.1.2 and 2.1.3 (and maybe in 2.1.0-2.1.1-- don't remember).
  • edited April 4, 2011
    There was actually a bug in the MODS translator that was breaking import when items had a displayLabel set on their attachments. (This was a side effect of the enhanced sandboxing in Zotero 2.1, which doesn't like E4X XML objects.) I've taken care of it, and hopefully we can push the updated translator soon.
  • Sorry about the incorrect and overconfident answer. Should have checked first.

    Thanks, Simon.
  • I downloaded the newest version of the MODS translator from the svn repository, and the problem is solved, thanks Simon !

    Now I'm just hoping the latest version of Zotero will be released soon ;-)
  • The updated MODS translator was already pushed to users.

This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.