https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35142
--- Comment #28 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 204167 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204167&action=edit Bug 35142: (follow-up) Fix detail page crash with invalid metadata The staff catalogue detail page called $biblio->normalized_upc, normalized_ean, and normalized_oclc unconditionally. These methods go through metadata_extractor which calls $biblio->metadata->record internally, re-fetching the (corrupt) metadata from the DB and ignoring the already-sanitized $marc_record. When a record has invalid MARCXML, this causes an unhandled exception instead of displaying the 'biberror' warning. Fix: use the Extractor directly with the already-recovered $marc_record (which was sanitized via StripNonXmlChars), and guard the block with a check that $marc_record is defined. Test plan: 1. Apply patch 2. Run: $ ktd --proxy --selenium up -d $ ktd --wait-ready 120 $ ktd --shell k$ prove t/db_dependent/selenium/regressions.t => SUCCESS: Tests pass (including 'detail page must not explode') 3. Sign off :-D -- 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/
