[Koha-bugs] [Bug 23846] bad iso 2709 record silently results in broken marcxml

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 12 11:22:46 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23846

--- Comment #2 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 95291
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95291&action=edit
Bug 23846: Display degraded view when MARCXML is invalid (staff detail)

When an invalid bibliographic record is imported into the catalogue
there is not warning or error. However the bibliographic record detail
page will explode (Koha::Biblio::Metadata->record will raise an
exception).

This patch proposes to catch the exception on this view and display a
warning about the situation.
Note that editing/saving the record will fix the MARCXML data and so
removes the warning (some black magic we should get rid of I suspect).

Test plan:
- Import a bibliographic record with invalid XML, you can add non
printable characters, like 0x1F (CTRL-V 1F with vim)
- Go to the detail page
=> Without this patch you get a 500
=> With this patch applied you get a "degraded view" with a warning
message, telling you what the error is.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list