Summary: | OAI-PMH should handle records without marcxml | ||
---|---|---|---|
Product: | Koha | Reporter: | Sophie MEYNIEUX <sophie.meynieux> |
Component: | Web services | Assignee: | Julian Maurice <julian.maurice> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | brendan, f.demians, julian.maurice, mirko |
Version: | 3.20 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
Sometimes, some biblioitems 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 mess
|
Version(s) released in: | |
Circulation function: | |||
Attachments: |
Bug 14363: OAI-PMH: Handle records without marcxml
Bug 14363: OAI-PMH: Handle records without marcxml Bug 14363: OAI-PMH: Handle records without marcxml |
Description
Sophie MEYNIEUX
2015-06-08 13:16:11 UTC
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 Created attachment 42135 [details] [review] Bug 14363: OAI-PMH: Handle records without marcxml Patch is for 3.20.x but should apply well on 3.18.x as well Needs a test plan. 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 Created attachment 45489 [details] [review] 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 Created attachment 45499 [details] [review] 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 3.22 (and) Master isn't effected - making a note for the RMaint. Thanks Pushed in 3.20.8. |