Bug 2327 - Performing a z39.50 search on an ISBN causes Koha to throw an error
Summary: Performing a z39.50 search on an ISBN causes Koha to throw an error
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Z39.50 / SRU / OpenSearch Servers (show other bugs)
Version: rel_3_2
Hardware: PC All
: P3 blocker (vote)
Assignee: Chris Cormack
QA Contact:
URL: http://koha.liblime.com/cgi-bin/koha/...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-09 09:00 UTC by Chris Nighswonger
Modified: 2019-06-27 09:24 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 00:49:54 UTC


---- Reported by cnighswonger@foundations.edu 2008-07-09 09:00:39 ----

Searching on either of these two ISBN's with the NEW YORK PUBLIC LIBRARY [catnyp.nypl.org] selected causes the error below:

083793950X
0837939518

Can't call method "raw" on an undefined value at /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl line 216.

I have also reproduced this on http://koha.liblime.com/cgi-bin/koha/cataloguing/z3950_search.pl?frameworkcode=BKS

Perhaps due to a corrupt record returned by that z39.50 server. Koha should probably handle this error more gracefully.



---- Additional Comments From jmf@liblime.com 2008-07-09 12:02:49 ----

OK, there are a couple of issues here

1. the system in question is a Innovative Interfaces system, and apparently they don't conform to bib1 standard (e.g., 1016 is normally keyword, but for III it's title)

2. ISBN searches don't work on the III systems I've experimented on, nor do most other searches for that matter, here's an example:

Z> open catnyp.nypl.org:210/innopac
Connecting...OK.
Sent initrequest.
Connection accepted by v2 target.
ID     : Z39.50-III
Name   : z39-innopac
Version: 1
UserInformationfield:
{
    OCTETSTRING(len=52) Innovative Interfaces Inc. Z39.50 SERVER version 1.1
}
Guessing visiblestring:
'Innovative Interfaces Inc. Z39.50 SERVER version 1.1'
Options: search present scan namedResultSets
Elapsed: 0.243543
Z> f @attr 1=1016 "Who's Who in the Media and Communications 1998-99"
Sent searchRequest.
Received SearchResponse.
Search was a bloomin' failure.
Number of hits: 0, setno 1
Result Set Status: none
records returned: 1
Diagnostic message(s) from database:
    [100] Unspecified error -- v2 addinfo 'Search taking too much time.  Server is disconnected.'
Elapsed: 60.038588
Z> 


3. This still doesn't explain why ISBN searches are crashing the z39.50-search script, but the error I get with the latest updates to that script looks like this:

[Wed Jul 09 11:50:45 2008] [error] [client 166.129.4.61] ZOOM error 1 "Permanent system error" (addinfo: "Permanent system error") from diag-set 'Bib-1', referer: http://staff-jmf.dev.kohalibrary.com/cgi-bin/koha/cataloguing/z3950_search.pl?frameworkcode=
[Wed Jul 09 11:50:45 2008] [error] [client 166.129.4.61] Premature end of script headers: z3950_search.pl, referer: http://staff-jmf.dev.kohalibrary.com/cgi-bin/koha/cataloguing/z3950_search.pl?frameworkcode=

So it's more of a bib1 error than anything III obviously isn't happy with the connection object stuff we're passing on to it ... it still shouldn't crash the script. So I'll submitted a patch that will warn the user when there are connection or search errors, and not crash the script. Hopefully that will resolve the issue well enough for 3.0.

The solution moving forward is to switch to pazpar2 for the metasearch of multiple targets -- and this has to be moved to 3.2, and should be high priority. In fact, we may want to consider replacing the default MARC editor in Koha with something a bit more robust like Biblios.



---- Additional Comments From chris@bigballofwax.co.nz 2009-12-12 09:13:39 ----

Is this still a problem chris?



---- Additional Comments From cnighswonger@foundations.edu 2009-12-13 01:43:54 ----

This does not seem to be an issue with the current HEAD. I'm marking it as WORKSFORME and closing it.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:49 UTC  ---

This bug was previously known as _bug_ 2327 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2327

Actual time not defined. Setting to 0.0

Comment 1 David Cook 2014-01-06 06:04:38 UTC
Just ran into this issue again while searching for an ISBN with a III database over z39.50.
Comment 2 Chris Nighswonger 2014-01-06 15:42:16 UTC
Be sure to change the status of a bug which has been closed to reopened if you have a case where the bug manifests.

Also, please include exact details on how to reproduce the bug.
Comment 3 David Cook 2014-01-06 22:44:13 UTC
Thanks for mentioning that, Chris!

However, it looks like my comment was unfounded. As per usual, I thought that I had checked master, but I had only checked 3.8.0. 

Jared resolved this issue with bug 8550, which has made it back as far as 3.8.4. 

I've double-checked master now, and it's working fine.

Sorry 'bout that!