[Bug 14363] New: OAI-PMH should handle records without marcxml
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 Bug ID: 14363 Summary: OAI-PMH should handle records without marcxml Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: sophie.meynieux@biblibre.com QA Contact: testopia@bugs.koha-community.org I know it should not happen, but sometimes it does, some biblioitems have got an empty marcxml. In this case, OAI harvester fails with a software error : <pre>Can't call method "as_xml" on an undefined value at /home/koha/src/opac/oai.pl line 516. Instead it should skip this record, output a message in log file, and correctly harvest the other records. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |julian.maurice@biblibre.com |ity.org | CC| |julian.maurice@biblibre.com Status|NEW |ASSIGNED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- In master, due to bug 3206, a biblio without marcxml is considered deleted and thus there is no error. However, something can be done for stable versions. In 3.18.x and 3.20.x, oai.pl fails with the following error: <pre>Empty String at /home/koha/src/opac/oai.pl line 228 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 --- Comment #2 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 42135 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42135&action=edit Bug 14363: OAI-PMH: Handle records without marcxml -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |3.20 Status|ASSIGNED |Needs Signoff --- Comment #3 from Julian Maurice <julian.maurice@biblibre.com> --- Patch is for 3.20.x but should apply well on 3.18.x as well -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net --- Comment #4 from Mirko Tietgen <mirko@abunchofthings.net> --- Needs a test plan. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- Test plan: 1/ git checkout 3.18.x 2/ GET http://OPAC/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml 3/ Take the first biblionumber from the results ($biblionumber) 4/ mysql> update biblioitems set marcxml=null where biblionumber=$biblionumber 5/ Repeat step 2 => XML error 6/ Apply patch 7/ Repeat step 2 => no errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42135|0 |1 is obsolete| | --- Comment #6 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 45489 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45489&action=edit Bug 14363: OAI-PMH: Handle records without marcxml Test plan: 1/ git checkout 3.18.x 2/ GET http://OPAC/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml 3/ Take the first biblionumber from the results ($biblionumber) 4/ mysql> update biblioitems set marcxml=null where biblionumber=$biblionumber 5/ Repeat step 2 => XML error 6/ Apply patch 7/ Repeat step 2 => no errors Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Works on 3.20.x -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45489|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45499 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45499&action=edit Bug 14363: OAI-PMH: Handle records without marcxml Test plan: 1/ git checkout 3.18.x 2/ GET http://OPAC/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml 3/ Take the first biblionumber from the results ($biblionumber) 4/ mysql> update biblioitems set marcxml=null where biblionumber=$biblionumber 5/ Repeat step 2 => XML error 6/ Apply patch 7/ Repeat step 2 => no errors Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Works on 3.20.x Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Fix works for 3.18.x and 3.20.x 3.22 is not impacted -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14363 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Text to go in the| |Sometimes, some biblioitems release notes| |records have empty marcxml. | |In this case, OAI harvester | |fails with a software | |error: Can't call method | |"as_xml" on an | |undefined value at | |/home/koha/src/opac/oai.pl | |line 516. Instead, now, | |record is skipped, and a | |message is sent to log | |file. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org