[Koha] 2.2.8 - Z3950 returning only one incorrect result

Mike Dalgity dalgity at htl.net
Fri Mar 30 15:12:29 NZST 2007


I was using the NPL template. I switched to default and it worked.  After a
while I figured out that the NPL searchresult.tmpl file needs to be
modified.

Change this:
<input type="hidden" name="op" id="op" value="do_search" />
<input type="hidden" name="title" value=<!-- TMPL_VAR NAME="title" --> />
<input type="hidden" name="author" value=<!-- TMPL_VAR NAME="author" --> />
<input type="hidden" name="isbn" value=<!-- TMPL_VAR NAME="isbn" --> />
<input type="hidden" name="issn" value=<!-- TMPL_VAR NAME="issn" --> />
<input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR
NAME="oldbiblionumber" -->" />

To this (quotes around <!-- TMPL_VAR NAME="param" -->):
<input type="hidden" name="op" id="op" value="do_search" />
<input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
<input type="hidden" name="author" value="<!-- TMPL_VAR NAME="author" -->"
/>
<input type="hidden" name="isbn" value="<!-- TMPL_VAR NAME="isbn" -->" />
<input type="hidden" name="issn" value="<!-- TMPL_VAR NAME="issn" -->" />
<input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR
NAME="oldbiblionumber" -->" />


Now that I have the Z39.50 client mostly running I've run into another
problem where searching for a title with more than one word results in an
Invalid Query (10010) in the log and a 500 Internal Server Error.  I suspect
the search term needs to be enclosed in quotes.  Can someone confirm?  Any
hints on what I need to change and where?

1 z3950.loc.gov error @attr 1=4  lord of the rings: Invalid query (10010)
0 amicus.collectionscanada.ca error @attr 1=4  lord of the rings: Invalid
query (10010)
[Wed Mar 28 21:49:47 2007] [error] [client 172.16.1.10] Premature end of
script headers: /var/www/koha/intranet/cgi-bin/z3950/search.pl



A few other less serious bugs that I've noticed:

The background shading in results table doesn't follow the correct pattern
when server changes.  This occurs in both Defualt and NPL templates

NPL reports all results are from one server.  It would be useful to have the
source server name in the table like the default template.

A '"' in any search field will change the search string because it will
terminate the value variable in the hidden input.

A 500 Internal Server Error - premature end of script headers is generated
whenever all servers report an error of some type.  There should probably be
an html error message returned to the browser instead.

Error messages like:
something went wrong: No error at
/var/www/koha/intranet/cgi-bin/z3950/search.pl line 138.
are very confusing.  As a minimum it should be changed to something like:
Connection attempt to <SERVER>: No error at
/var/www/koha/intranet/cgi-bin/z3950/search.pl line 138.


I'll submit some bug reports soon as I have a few spare moments.

Mike D.

P.S.  I've been having some problems resolving www.koha.org the past few
days.  Any DNS issues?


-----Original Message-----
From: Henri-Damien LAURENT [mailto:laurenthdl at alinto.com]
Sent: March 28, 2007 9:06 AM
To: Jason Ronallo
Cc: Mike Dalgity; koha at lists.katipo.co.nz
Subject: Re: [Koha] 2.2.8 - Z3950 returning only one incorrect result


Jason Ronallo a écrit :
> On 3/28/07, Mike Dalgity <dalgity at htl.net> wrote:
>> Hi Chris, I agree I can't see any reason why I'm getting these "/"'s
>> excpet
>> possibly a different perl module version or one with a bug maybe?
>
> I looked into this z3950 problem recently as well. If you look at
> older versions of this in cvs (which for some reason I can't see
> rel_2_2 right now), you'll see that part of the code seemed to check
> for this slash. Something like this:
>
> if ($isbn ne "/" || $issn ne "/") {
>               $attr='1=7';
>               $term=$isbn if ($isbn ne "/");
>               $term=$issn if ($issn ne "/");
> } elsif
>
> I tried putting this kind of check back into search.pl but it still
> didn't work.
>
> Where this slash comes from and why the check was taken out I don't
> know. If I remember correctly, and I wish I could see rel_2_2 in cvs
> right now to confirm, hdl made some of the changes removing the check
> for "/".
>
> Hope this gives someone a lead.
>
Yes.
I did.
And I also changed the template that added / to search terms.

The fact is that on my box, it works. And I thought that it would work
too for anyone.
But I use default intranet templates.
And I didnot touch the npl templates. So if you use them, you  may have
a better opinion of z3950 koha search when trying default template search.
If it is a problem of templates, I will correct them.
--
HDL




More information about the Koha mailing list