Zotero connector translator updates

134 views
Skip to first unread message

Aurimas Vinckevicius

unread,
Feb 4, 2013, 5:55:43 PM2/4/13
to zoter...@googlegroups.com
I guess I could dig into the code, but I thought it might be trivial for Dan or Simon to answer. Here's a short (off-topic) exchange Sebastian and I had on Zotero forums

Aurimas:
with connectors, how do translator updates work? Are they sync'ed with Standalone? Do you need to update connector translators manually via connector Options -> Advanced -> Update Translators?

adamsmith (Sebastian):
maybe I'm missing something (as I'm pretty sure you know this), but they update exactly as they do for Zotero for Firefox: Zotero Standalone phones home once a day and updates translators or you can get the updates automatically from the general tab of the Zotero preferences. The connectors use the translators in the Zotero data directory.

Aurimas: 
 Zotero connectors have direct access to the Zotero data directory? 
Also, in case where a connector is used without ZSA (i.e. directly with zotero.org) there is no zotero data directory... or is there?

adamsmith:
yes they do - I just tried this out - modify translator (marked as Chrome compatible) in scaffold for Firefox, safe, use Chrome connector with http.server enabled to import and the changes are present.
If used directly with server without ZSA I don't know - doesn't translation always happen server side, then? 

Sebastian's test does suggest that Zotero connectors do not update directly from zotero servers, but through ZSA (or firefox extension acting as ZSA). My question still remains though. I don't think that a Chrome (or Safari) connector has any way of knowing where the Zotero data directory is, so I can imagine that the connector communicates with ZSA for translator updates.

In either case, how is the following issue resolved: ZSA is 3.0.11, Zotero for Chrome is 3.0.8.1; There's a translator update with minVersion 3.0.9, so ZSA downloads it. Chrome asks for a translator update (or looks at the zotero data directory) and finds the new translator, but it should be incompatible with the current Chrome connector. So is there a separate Chrome connector translator directory that only gets updated with compatible translators? Or does this essentially ignore minVersion?

Thanks.
Aurimas

Simon Kornblith

unread,
Feb 4, 2013, 10:41:29 PM2/4/13
to zotero-dev
The connectors attempt to connect to Zotero Standalone for updated
translator metadata on launch or every 24 hours. If that fails, they
will contact repo.zotero.org, but only if it has been 24 hours since
the last update. They wait to retrieve the translator source until a
page that matches their targets is loaded, at which point they first
try Zotero Standalone and then try the repo. The translator source is
cached until the translator's lastUpdated date in the metadata changes
or until the browser is restarted.

At the moment, all components of the update system in both Zotero for
Firefox and the connectors ignore minVersion, so it shouldn't be used
to restrict translator updates to newer versions of Zotero.

Simon

Aurimas Vinckevicius

unread,
Mar 7, 2013, 4:14:15 AM3/7/13
to zoter...@googlegroups.com

> At the moment, all components of the update system in both Zotero for Firefox and the connectors ignore minVersion, so it shouldn't be used to restrict translator updates to newer versions of Zotero.

This is not a big issue, but it is getting a little annoying having to check if ZU.cleanISBN, ZU.cleanISSN, Z.getHiddenPref, etc. are implemented before using them, and I can imagine it will get even worse with time. So I'd be interested in this minVersion restriction actually being implemented.

I think I understand why it's not just as straightforward as saying "there's no update" if the client does not meet minVersion requirements. If I understand correctly, the problem comes down to connectors not having a local translator cache (at least not one that persists through browser restarts),  so an outdated connector would still need to be able to download a compatible version of the translator.

I don't have much insight into how repo.zotero.org works (it's not open source, is it?), but would it be feasible to cache old versions of translators when their minVersion gets bumped? Then serve those translators to outdated clients.

Let me know if there is something I can do to help get this working.

Aurimas

--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To post to this group, send email to zoter...@googlegroups.com.
Visit this group at http://groups.google.com/group/zotero-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Aurimas Vinckevicius

unread,
May 18, 2013, 12:00:09 AM5/18/13
to zoter...@googlegroups.com

Any chance this could be thrown up on github? I'd like to tinker around with this to see if I can add proper support for minVersion.

Aurimas Vinckevicius

unread,
Jul 10, 2013, 1:00:08 PM7/10/13
to zoter...@googlegroups.com

Bump? Even though the updated Chrome connector is out, we still cannot utilize some of the new features, like pre-selecting multiples, since there is no way to check their existence from translator side (though I suppose we can do a version check using some other function released in this update). It would be great to get translator version control to work properly though. Again, I wouldn't mind submitting patches for this if someone could point me to the source code.

Aurimas

Reply all
Reply to author
Forward
0 new messages