2.2.8 - Z3950 returning only one incorrect result
Hi, I've got a problem where Z3950 seems to be returning only one incorrect result no matter what the search criteria is. I have both AMICUS and LOC setup to be searched. Here's what appears in the logs: # tail -50 koha-error_log something went wrong: No error at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 134. something went wrong: No error at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 134. doing the search at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 144. doing the search at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 144. connection 0: event 1 (connect) connection 0: event 6 (send apdu) connection 0: event 2 (send data) connection 1: event 1 (connect) connection 1: event 6 (send apdu) connection 1: event 2 (send data) connection 1: event 3 (receive data) connection 1: event 7 (receive apdu) connection 1: event 6 (send apdu) connection 1: event 2 (send data) connection 1: event 3 (receive data) connection 1: event 7 (receive apdu) connection 1: event 9 (receive search) connection 1: event 10 (end) z3950.loc.gov at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 160. 1 z3950.loc.gov error @attr 1=7 "/": Unsupported search (3) Missconfigured search, malformed at opac connection 0: event 3 (receive data) connection 0: event 7 (receive apdu) connection 0: event 6 (send apdu) connection 0: event 2 (send data) connection 0: event 3 (receive data) connection 0: event 7 (receive apdu) connection 0: event 9 (receive search) connection 0: event 10 (end) amicus.collectionscanada.ca at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 160. # tail -5 koha-access_log 172.16.1.10 - - [21/Mar/2007:22:28:10 -0400] "POST /cgi-bin/koha/z3950/search.pl HTTP/1.1" 200 1315 172.16.1.10 - - [21/Mar/2007:22:30:06 -0400] "GET /cgi-bin/koha/acqui.simple/addbiblio.pl HTTP/1.1" 200 2974 172.16.1.10 - - [21/Mar/2007:22:30:21 -0400] "POST /cgi-bin/koha/acqui.simple/addbiblio.pl HTTP/1.1" 200 751959 172.16.1.10 - - [21/Mar/2007:22:30:50 -0400] "GET /cgi-bin/koha/z3950/search.pl?oldbiblionumber=&isbn=0842308245 HTTP/1.1" 200 1717 172.16.1.10 - - [21/Mar/2007:22:31:09 -0400] "POST /cgi-bin/koha/z3950/search.pl HTTP/1.1" 200 1315 The single result returned from amicus.collectionscanada.ca is: Roles, an introduction to the study of social relations / Banton, Michael P. 0422714909(pbk) but it should be (it is in both AMICUS and LOC): Endurance : Shackleton's incredible voyage / Alfred Lansing 0842308245 Did I miss something? Thanks for any assistance. Mike D.
Hi, OK I found the cause of my Z39.50 search problem but I'm going to need someone with more Perl experience to help me out here. I uncommented all the warn statements in cgi-bin/z3950/search.pl and added a few of my own to find the cause. First off I've been searching only by ISBN and addbiblio.pl appears to build the URL correctly. http://172.16.1.153:8080/cgi-bin/koha/z3950/search.pl?oldbiblionumber=&isbn= 0842308245 I noticed in the log that the isbn value is correct but the search term incorrectly has just a "/" like this: isbn : 0842308245 at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 107. query @attr 1=7 "/" at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 119. I added this line right after the variable declarations in search.pl: warn "taii :$title-$author-$isbn-$issn"; and discovered the output to be: taii :/-/-0842308245-/ at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 64. Can anyone explain to me why this section of code seems to set uninitialized input parameters to "/"'s? Because from what I can tell it shouldn't! my $title = $input->param('title'); my $author = $input->param('author'); my $isbn = $input->param('isbn'); my $issn = $input->param('issn'); Much Thanks, Mike D. -----Original Message----- From: koha-bounces@lists.katipo.co.nz [mailto:koha-bounces@lists.katipo.co.nz]On Behalf Of Mike Dalgity Sent: March 21, 2007 10:43 PM To: Koha Subject: [Koha] 2.2.8 - Z3950 returning only one incorrect result Hi, I've got a problem where Z3950 seems to be returning only one incorrect result no matter what the search criteria is. I have both AMICUS and LOC setup to be searched. Here's what appears in the logs: # tail -50 koha-error_log something went wrong: No error at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 134. something went wrong: No error at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 134. doing the search at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 144. doing the search at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 144. connection 0: event 1 (connect) connection 0: event 6 (send apdu) connection 0: event 2 (send data) connection 1: event 1 (connect) connection 1: event 6 (send apdu) connection 1: event 2 (send data) connection 1: event 3 (receive data) connection 1: event 7 (receive apdu) connection 1: event 6 (send apdu) connection 1: event 2 (send data) connection 1: event 3 (receive data) connection 1: event 7 (receive apdu) connection 1: event 9 (receive search) connection 1: event 10 (end) z3950.loc.gov at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 160. 1 z3950.loc.gov error @attr 1=7 "/": Unsupported search (3) Missconfigured search, malformed at opac connection 0: event 3 (receive data) connection 0: event 7 (receive apdu) connection 0: event 6 (send apdu) connection 0: event 2 (send data) connection 0: event 3 (receive data) connection 0: event 7 (receive apdu) connection 0: event 9 (receive search) connection 0: event 10 (end) amicus.collectionscanada.ca at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 160. # tail -5 koha-access_log 172.16.1.10 - - [21/Mar/2007:22:28:10 -0400] "POST /cgi-bin/koha/z3950/search.pl HTTP/1.1" 200 1315 172.16.1.10 - - [21/Mar/2007:22:30:06 -0400] "GET /cgi-bin/koha/acqui.simple/addbiblio.pl HTTP/1.1" 200 2974 172.16.1.10 - - [21/Mar/2007:22:30:21 -0400] "POST /cgi-bin/koha/acqui.simple/addbiblio.pl HTTP/1.1" 200 751959 172.16.1.10 - - [21/Mar/2007:22:30:50 -0400] "GET /cgi-bin/koha/z3950/search.pl?oldbiblionumber=&isbn=0842308245 HTTP/1.1" 200 1717 172.16.1.10 - - [21/Mar/2007:22:31:09 -0400] "POST /cgi-bin/koha/z3950/search.pl HTTP/1.1" 200 1315 The single result returned from amicus.collectionscanada.ca is: Roles, an introduction to the study of social relations / Banton, Michael P. 0422714909(pbk) but it should be (it is in both AMICUS and LOC): Endurance : Shackleton's incredible voyage / Alfred Lansing 0842308245 Did I miss something? Thanks for any assistance. Mike D. _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
On 28/03/2007, at 3:21 PM, Mike Dalgity wrote:
Hi, OK I found the cause of my Z39.50 search problem but I'm going to need someone with more Perl experience to help me out here. I uncommented all the warn statements in cgi-bin/z3950/search.pl and added a few of my own to find the cause. First off I've been searching only by ISBN and addbiblio.pl appears to build the URL correctly. http://172.16.1.153:8080/cgi-bin/koha/z3950/search.pl? oldbiblionumber=&isbn= 0842308245
I noticed in the log that the isbn value is correct but the search term incorrectly has just a "/" like this:
Hi Mike I can see no where in the code that it is being set to /. ISSN doesnt have a / in it when you search or anything like that? Chris
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? All fields are blank on the addbiblio screen except isbn. Forgot to mention that I'm seeing this problem because the isbn is replaced by the issn as the search term in this section of code: if ($isbn || $issn) { $attr='1=7'; $term=$isbn if ($isbn); $term=$issn if ($issn); } elsif ($title) { $attr='1=4 '; $term=$title; } elsif ($author) { $attr='1=1003'; $term=$author; } taii :/-/-0842308245-/ at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 64. taii :/-/-0842308245-/ at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 82. isbn : 0842308245 at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 107. issn : / at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 108. term : 0842308245 at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 110. term : / at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 112. term : / at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 120. query @attr 1=7 / at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 123. You can see above that $term was briefly set to the isbn before being replace by the "/" issn. Since all my input parameters will be "/" if they were left blank then an issn search would be the only one to succeed and all other searches will just be searching for the term "/". It's the following section of code that's assigning the "/"'s but I have no idea why. Note that the isbn above doesn't have a "/" at the end so it only occurs when the param is null. Does it depend on any perl modules? The param's are passed through the url right? and the url only has an empty oldbiblionumber and the isbn. my $title = $input->param('title'); my $author = $input->param('author'); my $isbn = $input->param('isbn'); my $issn = $input->param('issn'); Thanks, Mike D. -----Original Message----- From: Chris Cormack [mailto:chris@katipo.co.nz] Sent: March 28, 2007 12:00 AM To: Mike Dalgity Cc: koha@lists.katipo.co.nz Subject: Re: [Koha] 2.2.8 - Z3950 returning only one incorrect result On 28/03/2007, at 3:21 PM, Mike Dalgity wrote:
Hi, OK I found the cause of my Z39.50 search problem but I'm going to need someone with more Perl experience to help me out here. I uncommented all the warn statements in cgi-bin/z3950/search.pl and added a few of my own to find the cause. First off I've been searching only by ISBN and addbiblio.pl appears to build the URL correctly. http://172.16.1.153:8080/cgi-bin/koha/z3950/search.pl? oldbiblionumber=&isbn= 0842308245
I noticed in the log that the isbn value is correct but the search term incorrectly has just a "/" like this:
Hi Mike I can see no where in the code that it is being set to /. ISSN doesnt have a / in it when you search or anything like that? Chris
On 3/28/07, Mike Dalgity <dalgity@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. --Jason
Jason Ronallo a écrit :
On 3/28/07, Mike Dalgity <dalgity@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
Hi to All, I want to translate the template to Amharic (Ethiopian official language). Do you know whom I should contact if it is acceptable? I want to contribute. I want also to link my bibliographic records to full-text pdf file. I try to use mark field 856 subfield U. I put the pdf file under /etc/httpd/Ebooks but failed to link. I also try to put the pdf file under /var/www, /var/www/http but with our success. The httpd.conf file server root or the directory shows these folders. Is there other mechanisms to link the full-text. I am running koha 2.2.8 using redhat linux enterprise AS 3. Any idea helps. Regards, Mulu G.
Hi Mulu, ----- "Mulu Gebreegziabher" <mulugt@ethionet.et> wrote:
I want to translate the template to Amharic (Ethiopian official language). Do you know whom I should contact if it is acceptable? I want to contribute. First off, welcome to the Koha community. Glad you're interested in contributing. I've set up an Amharic OPAC translation instance at http://translate.koha.org. This is a Beta translation site, so if you have any difficulty or have suggestions for how to improve it let me know.
Sincerely, -- Joshua Ferraro SUPPORT FOR OPEN-SOURCE SOFTWARE President, Technology migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS jmf@liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS
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@alinto.com] Sent: March 28, 2007 9:06 AM To: Jason Ronallo Cc: Mike Dalgity; koha@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@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
participants (6)
-
Chris Cormack -
Henri-Damien LAURENT -
Jason Ronallo -
Joshua M. Ferraro -
Mike Dalgity -
Mulu Gebreegziabher