[Bug 30008] New: Software error in details.pl when invalid MARCXML and showing component records
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Bug ID: 30008 Summary: Software error in details.pl when invalid MARCXML and showing component records Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: 1 - Find a record in the staff catalog 2 - Edit the record 3 - In the 520 notes field, add an ASCII escape character (27 decimal, 1b hex) On ubuntu Ctrl+Shift+u, then 1b, enter 4 - Save the record 5 - Set syspref ShowComponentRecords to 'both...' 6 - On record details: New->New child record 7 - Save the record 8 - Attempt to view the parent record in the staff client and opac - FAIL -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29690 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29690 [Bug 29690] Software error in details.pl when invalid MARCXML -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Bug 30008 depends on bug 29690, which changed state. Bug 29690 Summary: Software error in details.pl when invalid MARCXML https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29690 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 131844 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131844&action=edit Bug 30008: (bug 29690 follow-up) Fix Invalid data, cannot decode metadata object Test plan: 1 - Find a record in the staff catalog 2 - Edit the record 3 - In the 520 notes field, add an ASCII escape character (27 decimal, 1b hex) On ubuntu Ctrl+Shift+u, then 1b, enter 4 - Save the record 5 - Set syspref ShowComponentRecords to 'both...' 6 - On record details: New->New child record 7 - Save the record 8 - Attempt to view the parent record in the staff client and opac -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com CC| |jonathan.druart+koha@gmail. | |com Severity|enhancement |normal -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131844|0 |1 is obsolete| | --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 131853 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131853&action=edit Bug 30008: (bug 29690 follow-up) Fix Invalid data, cannot decode metadata object Test plan: 1 - Find a record in the staff catalog 2 - Edit the record 3 - In the 520 notes field, add an ASCII escape character (27 decimal, 1b hex) On ubuntu Ctrl+Shift+u, then 1b, enter 4 - Save the record 5 - Set syspref ShowComponentRecords to 'both...' 6 - On record details: New->New child record 7 - Save the record 8 - Attempt to view the parent record in the staff client and opac Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131853|0 |1 is obsolete| | --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 131855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131855&action=edit Bug 30008: (bug 29690 follow-up) Fix Invalid data, cannot decode metadata object Test plan: 1 - Find a record in the staff catalog 2 - Edit the record 3 - In the 520 notes field, add an ASCII escape character (27 decimal, 1b hex) On ubuntu Ctrl+Shift+u, then 1b, enter 4 - Save the record 5 - Set syspref ShowComponentRecords to 'both...' 6 - On record details: New->New child record 7 - Save the record 8 - Attempt to view the parent record in the staff client and opac Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131855|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 131859 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131859&action=edit Bug 30008: (bug 29690 follow-up) Fix Invalid data, cannot decode metadata object Test plan: 1 - Find a record in the staff catalog 2 - Edit the record 3 - In the 520 notes field, add an ASCII escape character (27 decimal, 1b hex) On ubuntu Ctrl+Shift+u, then 1b, enter 4 - Save the record 5 - Set syspref ShowComponentRecords to 'both...' 6 - On record details: New->New child record 7 - Save the record 8 - Attempt to view the parent record in the staff client and opac Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Small note: + if ( my $components = $marc_record ? $biblio->get_marc_components(C4::Context->preference('MaxComponentRecords')) : undef ) {
From a theoretical perspective I would prefer to test $biblio here instead of $marc_record. If there is a biblio object, I can call it and if there is somehow no marc record, then I expect no components back ;) But it works, ok.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Marcel de Rooy from comment #5)
Small note:
+ if ( my $components = $marc_record ? $biblio->get_marc_components(C4::Context->preference('MaxComponentRecords')) : undef ) {
From a theoretical perspective I would prefer to test $biblio here instead of $marc_record. If there is a biblio object, I can call it and if there is somehow no marc record, then I expect no components back ;) But it works, ok.
No, that's the point. You can have a $biblio but no $marc_record. The error will happen later in get_components_query. It's what we decided earlier on bug 29690, we are dealing on invalid MARC *only* on this view. We add a big warning and data has to be fixed. There is also misc/maintenance/search_for_data_inconsistencies.pl that can catch such problems. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #6)
No, that's the point. You can have a $biblio but no $marc_record. The error will happen later in get_components_query.
If there is an error in that sub, it needs a fix :) Currently, Koha does not like biblios without MARC record. It will certainly trigger problems elsewhere too. But simply stated, if there is no MARC, there are no components. And as I said, this is just a theoretical discussion.
It's what we decided earlier on bug 29690, we are dealing on invalid MARC *only* on this view. We add a big warning and data has to be fixed. There is also misc/maintenance/search_for_data_inconsistencies.pl that can catch such problems.
Good. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29697 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697 [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|22.05.00 |22.05.00,21.11.05 released in| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.05 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org