]> git.koha-community.org Git - koha.git/commit
Bug 29690: Prevent detail.pl to crash if MARCXML is invalid
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 13 Jan 2022 05:21:15 +0000 (06:21 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Sat, 29 Jan 2022 07:52:54 +0000 (21:52 -1000)
commit11a018aa301fffc7ede93470e015119c1918a232
treedaa38f88c43251e5075ab2e5c5567ecb8ad1aee4
parent78cb924b12220fd5b81e4f62366006a35b9fefb7
Bug 29690: Prevent detail.pl to crash if MARCXML is invalid

Bug 23846 added support for invalid MARCXML.
But now page details.pl fails again with software error.
This comes from several Koha::Biblio calling $self->metadata->record without eval.

Test plan :
1) Create a biblio record with invalid MARCXML (see Bug 29690)
In koha-testing-docker there is biblionumber=369
2) Go to page cgi-bin/koha/catalogue/detail.pl?biblionumber=xxx
3) You see the page with a message :
There is an error with this bibliographic record, the view may be degraded.
Error: Invalid data, cannot decode metadata object ...

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
catalogue/detail.pl