Summary: | Koha return no result if there's invalid records in Z39.50/SRU server reply | ||
---|---|---|---|
Product: | Koha | Reporter: | Didier Gautheron <didier.gautheron> |
Component: | Z39.50 / SRU / OpenSearch Servers | Assignee: | Didier Gautheron <didier.gautheron> |
Status: | CLOSED FIXED | QA Contact: | Kyle M Hall (khall) <kyle> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, kyle, m.de.rooy, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.05,20.05.11
|
|
Circulation function: | |||
Attachments: |
Bug 26528: Z39.50/SRU ignore invalid replies
Bug 26528: Z39.50/SRU ignore invalid replies Bug 26528: Z39.50/SRU ignore invalid replies |
Description
Didier Gautheron
2020-09-24 08:11:16 UTC
Created attachment 110638 [details] [review] Bug 26528: Z39.50/SRU ignore invalid replies When searching for authorities if an authorities server reply has invalid records none are displayed. At least french BNF SRU server doesn't fully follow norm and can return an error confusing Koha protocol handler which then returns an empty MARC record. This patch silently removed bogus records. To Test: 1- Add BNF SRU server 2- Go to authorities page 3- Add an authority 4- Search for keyword(any) droits de l'homme 5- No result (Internal Server Error) 6- Apply patch 7- restart starman 8- redo 4 9- Many records are displayed Hi :) Please can you provide the coordinates of the BNF SRU server? Unfortunately, I don't have them. Hi, cf: https://doc.biblibre.com/koha/autour_de_koha/serveurs_z3950_sru and sql code adding it: https://git.biblibre.com/biblibre/tools/src/branch/master/koha/bnf_sru_aut.sql Created attachment 119033 [details] [review] Bug 26528: Z39.50/SRU ignore invalid replies When searching for authorities if an authorities server reply has invalid records none are displayed. At least french BNF SRU server doesn't fully follow norm and can return an error confusing Koha protocol handler which then returns an empty MARC record. This patch silently removed bogus records. To Test: 1- Add BNF SRU server 2- Go to authorities page 3- Add an authority 4- Search for keyword(any) droits de l'homme 5- No result (Internal Server Error) 6- Apply patch 7- restart starman 8- redo 4 9- Many records are displayed Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Thanks Didier, the SQL version is great, this allows me to add it to shared/custom.sql and have it loaded when starting my koha. Anyway, it works :) Created attachment 119733 [details] [review] Bug 26528: Z39.50/SRU ignore invalid replies When searching for authorities if an authorities server reply has invalid records none are displayed. At least french BNF SRU server doesn't fully follow norm and can return an error confusing Koha protocol handler which then returns an empty MARC record. This patch silently removed bogus records. To Test: 1- Add BNF SRU server 2- Go to authorities page 3- Add an authority 4- Search for keyword(any) droits de l'homme 5- No result (Internal Server Error) 6- Apply patch 7- restart starman 8- redo 4 9- Many records are displayed Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.05 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.Fixed info about backport to oldstable, 20.05 |