EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #05197


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Autocompletion, external source: ROMEO




On 30/11/15 15:52, George Mamalakis wrote:
Hi everybody,

I'm almost done with my installation/configuration. These are my last
questions, and once I'm through with them I'll finally air my EPrints
installation!! :):)

My library staff asked me to use the ROMEO url lookup (by looking up its
database). So, I tried to follow the specific wiki section of the
autocompletion guide
(http://wiki.eprints.org/w/Autocompletion#external_source), aaaaand...of
course I didn't manage it :(.

I edited my field to call the new lookup function and added the new
lookup function in my config. I don't seem to be getting any errors in
my apache log files, and I can see with tcpdump that whenever the
autocomplete ajax request is triggered, traffic from my machine to port
80 of www.nottingham.ac.uk is generated (which probably implies that my
queries are sent there via some service). Nonetheless, I don't seem to
see any feedback in my field.

More specifically, my cfg/workflows/eprint/default.xml is as follows:

<component type="Field::Multi"><field ref="ml_title" required="yes"
input_lookup_url="{$config{rel_cgipath}}/users/lookup/get_journals"
input_lookup_params="id={eprintid}&amp;dataset=eprint&amp;field=ml_title"/></component>


since I'm using a multilingual setup (so I'm using the ml_title field
instead of the title field), and my
~eprints/cgi/users/lookup/get_journals is exactly the one shown in the
wiki page.

I recognise my writing style :)

Is cgi/get_journals returning any data?

Try knocking up a quick script which basically does "perl get_journals" - but includes all the stuff you need to get the library path for EPrints, and provides the current repository.

The get_journals script as on the page should be dumping html fragments into your apache error_log (the ' warn "\n\n$html\n\n";' line in 'process_journal' - if you're seeing nothing, then the LWP::UserAgent call isn't getting any data - add some debugging statements into the code to check the value of $query, and of $content (in 'get_journals')

--

Ian Stuart.
Developer: ORI, RJ-Broker, and OpenDepot.org
Bibliographics and Multimedia Service Delivery team,
EDINA,
The University of Edinburgh.

http://edina.ac.uk/

This email was sent via the University of Edinburgh.

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.