Problems with Library catalog - Aleph translator

68 views
Skip to first unread message

sylvain

unread,
Jul 23, 2010, 7:41:34 AM7/23/10
to zotero-dev
Hi all,
after a post on a french blog (
http://bibliotheques.wordpress.com/2010/07/22/opac-aleph-non-zotero-compatible-—-probleme-en-suspens/
) some of us in France have started to have a look at a problem with
the Aleph translator. I'm going to try to summarize there what we've
found until now.

If you go to this opac http://catalogue.univ-angers.fr/ for example
and look at a record (search harry potter for example, an go on first
result : "Harry Potter : un succès mondial démystifié "), the zotero
icon appears but if you try to save to zotero there's an error. Now,
if you change in the url &format=999 to &format=001, you'll get the
marc view of the record. Now if you just come back to the previous
page (where there was an error saving the record) and you try again to
save the record, it works !

According to what we've understood already, it is related to cache
management. If you try to do the same thing disabling cache (web
developper toolbar > Disable cache), looking at marc view won't solve
the problem.

I tried to modify the translator to find more. Adding some code
( http://gist.github.com/485917 ) inside the processdocuments section,
I can find that when there's the error, the newDoc I get with
processDocuments, contains only the head section. And when the marc
view is in cache, newDoc contains head section, but also body section.

The translator works on :
- http://portail-scd.univ-brest.fr
- http://opac.biu-montpellier.fr/

But doesn't work on
- http://catalogue.univ-angers.fr/
- http://bibli.polytechnique.fr

I don't know if the problem is the same with non french catalogs but
If somebody has any idea on how to solve this, we're interested in any
advice.

Thanks

Dan Stillman

unread,
Jul 23, 2010, 2:15:18 PM7/23/10
to zoter...@googlegroups.com
Does this happen with the latest 2.0 branch XPI?

http://www.zotero.org/support/dev/svn_and_trac_access#development_xpi

On 7/23/10 7:41 AM, sylvain wrote:
> Hi all,
> after a post on a french blog (

> http://bibliotheques.wordpress.com/2010/07/22/opac-aleph-non-zotero-compatible-�-probleme-en-suspens/


> ) some of us in France have started to have a look at a problem with
> the Aleph translator. I'm going to try to summarize there what we've
> found until now.
>
> If you go to this opac http://catalogue.univ-angers.fr/ for example
> and look at a record (search harry potter for example, an go on first

> result : "Harry Potter : un succ�s mondial d�mystifi� "), the zotero


> icon appears but if you try to save to zotero there's an error. Now,

> if you change in the url&format=999 to&format=001, you'll get the

sylvain

unread,
Jul 26, 2010, 3:05:34 AM7/26/10
to zotero-dev
Yes, and also with the trunk version.

Sylvain

On Jul 23, 8:15 pm, Dan Stillman <dstill...@zotero.org> wrote:
>   Does this happen with the latest 2.0 branch XPI?
>
> http://www.zotero.org/support/dev/svn_and_trac_access#development_xpi
>
> On 7/23/10 7:41 AM, sylvain wrote:
>
> > Hi all,
> > after a post on a french blog (
> >http://bibliotheques.wordpress.com/2010/07/22/opac-aleph-non-zotero-c...-probleme-en-suspens/
> > ) some of us in France have started to have a look at a problem with
> > the Aleph translator. I'm going to try to summarize there what we've
> > found until now.
>
> > If you go to this opachttp://catalogue.univ-angers.fr/for example
> > and look at a record (search harry potter for example, an go on first
> > result : "Harry Potter : un succ s mondial d mystifi "), the zotero
> > icon appears but if you try to save to zotero there's an error. Now,
> > if you change in the url&format=999 to&format=001, you'll get the
> > marc view of the record. Now if you just come back to the previous
> > page (where there was an error saving the record) and you try again to
> > save the record, it works !
>
> > According to what we've understood already, it is related to cache
> > management. If you try to do the same thing disabling cache (web
> > developper toolbar>  Disable cache), looking at marc view won't solve
> > the problem.
>
> > I tried to modify the translator to find more. Adding some code
> > (http://gist.github.com/485917) inside the processdocuments section,
> > I can find that when there's the error, the newDoc I get with
> > processDocuments, contains only the head section. And when the marc
> > view is in cache, newDoc contains head section, but also body section.
>
> > The translator works on :
> > -http://portail-scd.univ-brest.fr
> > -http://opac.biu-montpellier.fr/
>
> > But doesn't work on
> > -http://catalogue.univ-angers.fr/
> > -http://bibli.polytechnique.fr

Ming-Yeung

unread,
Mar 17, 2011, 6:38:42 PM3/17/11
to zoter...@googlegroups.com
I'm sorry that I accidentally sent a mail to Sylvain instead of posting a reply here.
I would like to revive this thread. I am working at the Catholic University Leuven (http://opac.libis.be) and experiencing similar problem. I also tested a bit with the translator, and found also that the newDoc is indeed incomplete which cause the translator (MARC) to fail.

Does anyone have an idea what the problem is? Any suggestion for further testing? Thanks!

For reference see the discussion here: http://forums.zotero.org/discussion/5680/aleph-translator/
 apparently not only non-English websites: http://forums.zotero.org/discussion/6696/another-aleph-problem/
 ticket: https://www.zotero.org/trac/ticket/1350

Ming-Yeung

unread,
Mar 24, 2011, 1:40:56 PM3/24/11
to zoter...@googlegroups.com
So far I have some success.
  1. I found that for some libraries the problem can be worked around by adding the items to a personal shelf, then add the items from the shelf.
  2. So I guess that the document (newDoc) may be completely loaded if I can re-compose the address using the format for items in the personal shelf.
  3. The func=myshelf-full should be used in this case
  4. But it also need the doc_number (instead of the set_number and set_entry)
  5. So I extracted the "add to shelf" link from the current page, by searching for the link containing the function func=myshelf-add-ful-1
  6. replace it with myshelf-full
  7. add or change the format=001
  8. use the new url as the url for Zotero to process
It is successful for the 2 sites that I tested, http://catalogue.univ-angers.fr and http://opac.libis.be. So far I only tested on single items.

For those websites that the "add to shelf" or "ajouter au panier" do not appear on the single item page, another method has to be  used. If the doc_number appears in the page, then there is hope that a re-composed url using func=myshelf-full may work.

I hope some experienced translator developer may help in this issue. I am totally new to web programming so it took me lots of time to produce some probably very clumsy codes. Thanks for any help.

Ming-Yeung

unread,
Apr 1, 2011, 10:35:58 AM4/1/11
to zoter...@googlegroups.com
Some success so far but only for single items. Due to the nature of the solution, it is more difficult to work with "multiple".

Instead of using the myshelf-full function, I use the direct function. The most important thing is to get the doc_number. For some library catalogues which are not working (with the simple changing format to 001), the "add to basket" or equivalent link is not there. Some other solution has to be found. Usually there is a link with the doc_number in it, or it is just hidden in the comments. If a new URI can be composed by using the original URI of the webpage, the function direct (or myshelf-full) and the doc_number, then it may work.

Here is my trail, please test it on different sites. Any remarks of the coding style/convention are also welcomed, as I have no experience. Thanks.

http://github.com/mysheepb/Zotero-translators/raw/master/Library%20Catalog%20%28Aleph%29.js

Avram Lyon

unread,
Apr 3, 2011, 3:29:12 PM4/3/11
to zoter...@googlegroups.com
2011/4/1 Ming-Yeung <mingyeun...@gmail.com>:

> Some success so far but only for single items. Due to the nature of the
> solution, it is more difficult to work with "multiple".
[..]

> Here is my trail, please test it on different sites. Any remarks of the
> coding style/convention are also welcomed, as I have no experience. Thanks.

This looked quite fine. The code worked in my testing, and it even did
multiple item saves in some cases.

I've committed the code for now (r8920), since it's a quite important
improvement and there's no reason to force users to wait. As reports
of its limitations come in (if they do), we'll try to touch it up as
necessary. Thanks for working on this.

- Avram

Ming-Yeung

unread,
Apr 4, 2011, 7:24:20 AM4/4/11
to zoter...@googlegroups.com
Thanks. The multiple item save has always been working for some sites.

But we haven't found the reason why Zotero is not able to get the whole page in the first place. Now I use alternative URI's to make sure that a full page will be loaded. However, the previous simple method of replacing (adding) format=001 for MARC record works always if you just put the in the address space of Firefox. I mean Firefox can display those MARC records, why cannot Zotero load them for parsing? If this problem is solved, we don't have to use the work-around method that I used. Until this problem is solved, we have to rely on alternatives.

Thanks.
Reply all
Reply to author
Forward
0 new messages