Unable to save from Primo catalog
This discussion was created from comments split from: Speeding up the Primo fix.
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
https://usearch.uaccess.univie.ac.at/primo-explore/fulldisplay? ETC...
Ideally I'd need someone with a bit of experience either in web development and/or with that catalog instance to help troubleshoot.
@pegra -- how do other proxied resources look? E.g. for a JSTOR article, how does that look proxied? What I'm guessing might not work correctly is the fact that the typical proxy pattern (e.g. as you your user has it configured) applied to https://usearch.univie.ac.at/) would give you https://usearch.univie.ac.at.uaccess.univie.ac.at/
Here the JSTOR article example:
Article:
Hofmann, W. (2010). Goya und Wien. Artibus Et Historiae, 31(62), 233-243.
Available at Vienna University Library via: JSTOR Arts and Sciences III
Link full display Primo when logged in:
https://usearch.uaccess.univie.ac.at/primo-explore/fulldisplay?docid=TN_jstor_archive_325822482&context=PC&vid=UWI&lang=de_DE&search_scope=UWI_UBBestand&adaptor=primo_central_multiple_fe&tab=default_tab&query=any,contains,goya wien hofmann werner&offset=0
Proxied article link in JSTOR:
https://www-jstor-org.uaccess.univie.ac.at/stable/25822482?seq=1#metadata_info_tab_contents
Is that what you need to know for analyzing? Does that help?
In Primo the URL changes from usearch.univie.ac.at to usearch.uaccess.univie.ac.at wheres on the JSTOR platform the proxy gets added.
Can you please log into Primo, search for a title and then look at the PNX data? Either add simply "&showPNX=true" to your url or look for the url in the source code of the website, where it has the class "urlToXmlPnx".
What is the type given in the PNX data? Can you see why the lines https://github.com/zotero/translators/blob/master/Primo Normalized XML.js#L55-L58 in the Zotero translator fail for your PNX data?
Example (logged in, using EZproxy):
(display)
(type)book(/type)
(title)Corpus musicae popularis Austriacae : Gesamtausgabe der Volksmusik in Österreich in repräsentativer Auswahl : 20 : Volksmusik in Wien. Weana Tanz (Wiener Tänze), Teil 1 : Geschichte und Typologie / hrsg. vom Wiener Volksliedwerk. Walter Deutsch und Ernst Weber(/title)
[...]
(facets)
[...]
(prefilter)books(/prefilter)
(rsrctype)books(/rsrctype)
[...]
(I changed angle backet to round brackets as I do not know how to mark code so that it is displayed as code.)
These are the types we use in our Primo template in display/type:
article
audio
book
collection
database
image
journal
loseblatt
map
mbw
other
schriftenreihe
score
video
=> Anything more I can check?! As the PNX data is the same I suppose the problem must be connected to the change in the URL when logged in.
Can you copy and paste the complete XML somewhere online, e.g. at https://pastebin.com/ ?
XML when using EZproxy:
(?xml version="1.0" encoding="UTF-8"?)
(record xmlns="http://www-exlibrisgroup-com.uaccess.univie.ac.at/xsd/primo/primo_nm_bib" xmlns:sear="http://www-exlibrisgroup-com.uaccess.univie.ac.at/xsd/jaguar/search")
XML without EZproxy (Primo translator / import works in this case):
(?xml version="1.0" encoding="UTF-8"?)
(record xmlns="http://www.exlibrisgroup.com/xsd/primo/primo_nm_bib" xmlns:sear="http://www.exlibrisgroup.com/xsd/jaguar/search")
[Again round brackets, sorry for that!]
Any idea how to solve this?
ZU.urlToProper() should be able to unproxy those, but that doesn't seem particularly appropriate — XML namespace URIs should never be proxied, so this isn't really something the translator should have to worry about.
record xmlns="http://www.exlibrisgroup.com/xsd/primo/primo_nm_bib" xmlns:sear="http://www.exlibrisgroup.com/xsd/jaguar/search"
However the Zotero connector still does not work when I am logged in and the URL is proxied...
I just produced another Debug ID: D589971192.
In the errors I can still find the JavaScript error "Could not locate item type..."
I will be on vacation the next two weeks but my colleague Christian will follow the forum thread. So if you have any findings he will answer.
Thanks in advance!
var itemType = ZU.xpathText(doc, '//p:display/p:type', ns) || ZU.xpathText(doc, '//p:facets/p:rsrctype', ns) || ZU.xpathText(doc, '//p:search/p:rsrctype', ns);
(
p
in this case ishttp://www.exlibrisgroup.com/xsd/primo/primo_nm_bib
, so unprefixed in your case.)Could you either post the PNX somewhere (e.g., pastebin) or check to see why those XPaths aren't matching?