Local translator js file not being invoked

Hi,

I am running Zotero 5 with the Firefox connector, and using a portable version of Firefox 55.0.3

I had a local translator customized to retrieve local fields added to our Primo records, this now no longer works, and none of the local fields are being retrieved and saved.

In troubleshooting I tried a variety of things, none of which worked. I found two sets of translators, and not being sure, ran tests on both sets:
...\FirefoxPortable\Data\profile\zotero\translators
C:\Users\[user_name]\Zotero\translators


I tried deleting the Primo.js translator to see if our local one would be invoked (you can see the local translator here : https://espace.bib.uqam.ca/sj/zotero/_Virtuose.Primo.UQAM.js), this did not work.

I deleted the Primo.js file, and renamed the local file 'Primo.js', this did not work.

I deleted all Primo related js files and still Zotero scanned the results successfully, the translator icon show the tool tip 'Save to Zotero (Primo)', saved the records, but still ignored the local fields.

Each time I tried something I shut down Firefox, shut down Zotero, re-started Firefox, re-started Zotero.

Where is the tool tip 'Save to Zotero (Primo)' coming from? What translator is Zotero using to save records from our Primo (http://virtuose.uqam.ca/)?

Can you suggest some way to proceed so that I can ensure that local translators are taken into account? Is there some cache I need to clear or some permissions I have to set?

Thank you for any help you may provide.

Sacha
  • Don't delete the existing translator. Just add yours with a different translatorID and a lower number in the 'priority' field (for a higher priority) to the 'translators' directory in your Zotero data directory, restart Zotero, and then Reset Translators from the Advanced pane of the connector.
  • Hi,
    Thanks that worked! Zotero is using the correct translator for our Primo (and using the generic Primo.js for other Primos), but I am getting a error when trying to save a record:
    "An error occurred while saving this item. See Troubleshooting Translator Issues for more information."

    I used an online GUID generator to get a new ID, and set the priority to '99' one below the generic Primo.js translator. Nothing else of substance has changed with the local translator. Is there something I should be updating in the translator for it to work with Zotero 5? I've viewed the log output but there is nothing about any errors that I can see.
    Thanks,
    Sacha
  • There's definitely a relevant error -- it would be in the error report from the connector, not Zotero Standalone. We can't say anything without it -- I'm not aware of any way in which 5.0 breaks web translators compatible with 4.0. We haven't adapated Primo.js, for example.
  • I think there is a problem at my end with the Primo response to the PNX request. Instead of providing the correct xml, I'm getting a 500 error, my machine is balking at something...I'll follow up when I figure it out. Thanks for confirming that Primo.js continues to work without any changes.
  • I took the most recent Primo.js translator and adapted it by adding our local fields. Everything works fine now. Thanks for all your help!
  • anything that might be worth folding into the general translator?
  • Hi Adam,

    I'm adding local fields from the Primo PNX, I think these would be different for each institution so I don't think these would apply generically.

    The bits I've added are as follows for local display fields (lds) and an extra addata element where we put some local notes :

    item.callNumber = ZU.xpathText(doc, '//display/lds02');
    item.url = ZU.xpathText(doc, '//display/lds04|//display/lds06');
    item.extra = ZU.xpathText(doc, '//addata/mis2');

    Sorry for the extremely delayed response, your last comment got lost in my inbox and I only just saw it now.

    By the way and if you don't already know, the new Primo interface will expose the PNX to Zotero with the November release that's due out soon. Here's the blurb from the release notes :

    Zotero Support in the New UI – requested by NERS. Primo now provides the ability to extract PNX fields in the new Primo UI just as in the classic interface. The Zotero translator needs to be adjusted to use the new path for the show PNX call in the new UI.
  • Thanks -- that indeed sounds quite custom.

    And no, I wasn't aware of the November update at all -- that's great news! Could you let us know as soon as you're aware of any institution that has this running so we can adjust the translator?

    CC @zuphilip
  • Ok, should I start a new discussion? There may be some back and forth.
  • Yes, please do
  • Hi Adam,

    Can you contact me directly at jerabek.alexander_j@uqam.ca ? Ex Libris has a test environment for upcoming releases but I don't think it`s for public consumption.

    Sacha
Sign In or Register to comment.