Koha-clms/catalogue
Jonathan Druart a25bd1daa5 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.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 068943f18d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-11-15 11:27:07 +01:00
..
ISBDdetail.pl Bug 8995: (follow-up) Add tests, move open_url/coins routines to Koha namespace 2019-04-29 15:34:10 +00:00
MARCdetail.pl Bug 8995: (follow-up) Add tests, move open_url/coins routines to Koha namespace 2019-04-29 15:34:10 +00:00
detail.pl Bug 23846: Display degraded view when MARCXML is invalid (staff detail) 2019-11-15 11:27:07 +01:00
export.pl Bug 19995: use Modern::Perl in Catalogue perl scripts 2018-02-05 09:45:47 -03:00
getitem-ajax.pl Bug 22762: Fix items.collection display on receiving 2019-04-25 09:52:31 +00:00
image.pl Bug 19995: use Modern::Perl in Catalogue perl scripts 2018-02-05 09:45:47 -03:00
imageviewer.pl Bug 19995: use Modern::Perl in Catalogue perl scripts 2018-02-05 09:45:47 -03:00
issuehistory.pl Bug 21291: (follow-up) Pass subscriptionsnumber to all tools in staff detail's sidebar 2018-10-15 13:40:47 +00:00
itemsearch.pl Bug 22424: Add search by all lost statuses to item search 2019-04-30 13:39:44 +00:00
labeledMARCdetail.pl Bug 22034: Handle default framework for MARC view with framework 2019-01-02 20:52:53 +00:00
moredetail.pl Bug 20912: Rental Fees based on Time Period 2019-03-07 17:22:43 +00:00
search-history.pl Bug 16593: Do not allow patrons to delete search history of others patrons 2016-06-24 11:47:29 +00:00
search.pl Bug 12441: Search.pl conditional checks and displays using same syspref 2019-03-23 09:47:37 +00:00
showmarc.pl Bug 20083: Information disclosure when (mis)using the MARC Preview feature 2018-04-04 15:40:07 -03:00
stockrotation.pl Bug 21291: (follow-up) Pass subscriptionsnumber to all tools in staff detail's sidebar 2018-10-15 13:40:47 +00:00
updateitem.pl Bug 21206: Replace C4::Items::GetItem 2019-02-26 13:24:07 +00:00