[Koha-bugs] [Bug 23846] Handle records with broken MARCXML on the bibliographic detail view

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 12 17:07:15 CET 2019


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

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #95291|0                           |1
        is obsolete|                            |

--- Comment #5 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 95329
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95329&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.

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

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


More information about the Koha-bugs mailing list