https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43777
--- Comment #1 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 207703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207703&action=edit Bug 43777: Repair recoverable MARCXML faults in Koha::Biblio::Metadata->record Bug 35104 repairs non-XML characters and empty datafields when saving MARCXML. Metadata that was already corrupt before that, or that bypassed store(), still made ->record throw, so each caller had to catch Koha::Exceptions::Metadata::Invalid and re-implement its own fallback. ->record now falls back to repair_marcxml and returns the repaired MARC::Record. Each repaired fault is reported through object_messages, as store() does, so callers that want to tell the user can and the rest can ignore it. The repair is not written back to the database. Unrecoverable metadata still throws Invalid. record_strip_nonxml is now redundant (and only covered one of the two faults), so it is removed and its callers use ->record. Koha::Biblio->metadata previously built a new wrapper on every call, so messages reported by ->record were lost before they could be read. It now returns the same wrapper for as long as it wraps the same row. Test plan: 1. prove t/db_dependent/Koha/Biblio/Metadata.t 2. prove t/db_dependent/Koha/Biblio.t t/db_dependent/Biblio.t \ t/db_dependent/OAI/ t/db_dependent/Exporter/Record.t Sponsored-by: OpenFifth Co-Authored-By: Claude Sonnet 5.5 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
