[Bug 42512] New: Marc control field length detection prevents editing of records with invalid MARCXML
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 Bug ID: 42512 Summary: Marc control field length detection prevents editing of records with invalid MARCXML Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Bug 34014 made it possible to edit a broken record by stripping non-xml characters from the metadata Bug 40272 added a check for length of control fields, however, it also regenerated the marc record, and didn't catch errors from bad xml We should pass the already cleaned record to the check rather than fetching it again -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | Depends on| |40272 Patch complexity|--- |Trivial patch Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40272 [Bug 40272] Add an alert for incorrect (MARC21) fixed-length control fields -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 198455 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198455&action=edit Bug 42512: Pass already checked/cleaned MARC::Record to Metadata Extractor To test: 1 - In Koha testing docker record 369 has invalid xml, otherwise corrupt a record like: sudo koha-mysql kohadev UPDATE biblio_metadata SET metadata = UpdateXML(metadata, '//datafield[@tag="040"]/subfield[@code="c"]',CONCAT('<subfield code',CHAR(27),'="c">OSt</subfield>')) WHERE biblionumber=438; 2 - View the record in the staff client - note bad metadata message http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=438 3 - Click 'Edit' 4 - Error 500, in logs: Invalid data, cannot decode metadata object 5 - Apply patch, restart all 6 - Reload record and click edit 7 - Success! Message about bad metadata, but can edit/save -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198455|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 --- Comment #2 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 198475 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198475&action=edit Bug 42512: Pass already checked/cleaned MARC::Record to Metadata Extractor To test: 1 - In Koha testing docker record 369 has invalid xml, otherwise corrupt a record like: sudo koha-mysql kohadev UPDATE biblio_metadata SET metadata = UpdateXML(metadata, '//datafield[@tag="040"]/subfield[@code="c"]',CONCAT('<subfield code',CHAR(27),'="c">OSt</subfield>')) WHERE biblionumber=438; 2 - View the record in the staff client - note bad metadata message http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=438 3 - Click 'Edit' 4 - Error 500, in logs: Invalid data, cannot decode metadata object 5 - Apply patch, restart all 6 - Reload record and click edit 7 - Success! Message about bad metadata, but can edit/save Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Marc control field length |MARC control field length |detection prevents editing |detection prevents editing |of records with invalid |of records with invalid |MARCXML |MARCXML -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198475|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42512 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201651 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201651&action=edit Bug 42512: Pass already checked/cleaned MARC::Record to Metadata Extractor To test: 1 - In Koha testing docker record 369 has invalid xml, otherwise corrupt a record like: sudo koha-mysql kohadev UPDATE biblio_metadata SET metadata = UpdateXML(metadata, '//datafield[@tag="040"]/subfield[@code="c"]',CONCAT('<subfield code',CHAR(27),'="c">OSt</subfield>')) WHERE biblionumber=438; 2 - View the record in the staff client - note bad metadata message http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=438 3 - Click 'Edit' 4 - Error 500, in logs: Invalid data, cannot decode metadata object 5 - Apply patch, restart all 6 - Reload record and click edit 7 - Success! Message about bad metadata, but can edit/save Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org