[Koha-devel] z39.50 "do you want to save search.pl?" bug, was: Bug reporting by amateurs

MJ Ray mjr at phonecoop.coop
Tue Aug 28 01:24:22 CEST 2007


Roger Horne <roger at hrothgar.co.uk> wrote:
> I still have to discover how Bugzilla works. I note that there is another
> "new" report about z3950 problems but I cannot see how to read it so I am
> not sure if it is the same problem. (No. 1389 assigned to Paul.Poulain).

http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1389 but it's
not the same problem.

> There may be others on the same subject, so I thought it best to post here.

Thanks.

> I mentioned a week or so ago on one of the Koha lists about the z3950 search
> failing for me, and others have reported the same thing. The log contains the
> usual errors about headers etc and the program asks if I want to save
> search.pl. 
>
> Yet it seemed to work for others. MJ Ray was trying to find the
> problem.
>
> I think that I may have discovered the bug, although not necessarily the
> cure.
>
> z3950/search.pl contains the lines
>  
> # warn ("server data",$server->{name}, $server->{port});
> $oConnection[$s]->connect($server->{host}, $server->{port}) 
>   || warn ("something went wrong: ".$oConnection[$s]->errmsg());
>
> I uncommented and changed the warning to read:
>  warn ("server data: ",$server->{name}, $server->{port}, $server{host});
>
> and the response was z3950.loc.gov, 7090, Library of Congress
>
> So in my case the script was sending Library of Congress:7090 into the
> ether. And it naturally failed.
>
> The reason is that I used the true host name in the z3950
> servers file.

No, it isn't.  $server comes from the results of the query
  select * from z3950servers where id=?
and on my server, z3950servers includes:
+------------------+------+---------+
| host             | port | name    |
+------------------+------+---------+
| z3950.loc.gov    | 7090 | LOC     |
+------------------+------+---------+
while on your server, I'll bet that host was Library of Congress,
while name was z3950.loc.gov - the fields were backwards.

Not sure how that would have happened.  I guess "Z39.50 Server" on
http://sitename:8080/cgi-bin/koha/admin/z3950servers.pl
is a bit confusing and badly placed in the form.  I've put the
following patch in for the next version:

Index: z3950servers.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/Attic/z3950servers.tmpl,v
retrieving revision 1.16.2.2
diff -u -r1.16.2.2 z3950servers.tmpl
--- z3950servers.tmpl	13 Jun 2007 12:57:16 -0000	1.16.2.2
+++ z3950servers.tmpl	27 Aug 2007 23:24:40 -0000
@@ -79,13 +79,13 @@
 			<input type="hidden" name="op" value="add_validate">
 			<!-- TMPL_IF NAME="searchfield" -->
 				<p>
-					<label class="label100">Z39.50 Server</label>
+					<label class="label100">Z39.50 Server Short Name</label>
 					<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->"><!-- TMPL_VAR NAME="searchfield" -->
 				</p>
 			<!-- TMPL_ELSE -->
 				<p>
-					<label class="label100">Z39.50 Server</label>
-					<input type="text" name="searchfield" size="100" maxlength="100" onblur="toUC(this)">
+					<label class="label100">Z39.50 Server Short Name</label>
+					<input type="text" name="searchfield" size="30" maxlength="30" onblur="toUC(this)">
 				</p>
 			<!-- /TMPL_IF -->
 			<p>

Hope that helps,
-- 
MJ Ray - see/vidu http://mjr.towers.org.uk/email.html
Experienced webmaster-developers for hire http://www.ttllp.co.uk/
Also: statistician, sysadmin, online shop builder, workers co-op.
Writing on koha, debian, sat TV, Kewstoke http://mjr.towers.org.uk/





More information about the Koha-devel mailing list