[Bug 23425] New: Search explodes with "invalid data, cannot decode object"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 Bug ID: 23425 Summary: Search explodes with "invalid data, cannot decode object" Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 22144 If the MARCXML data is wrong for some reasons and so MARC::Record::new_from_xml fails, a search will explodes with "invalid data, cannot decode object" We should: - Understand why the data is wrong - Provide a maintenance script to catch problematic data - Skip the record instead of exploding (or maybe not, it will hide a data problem) It has been highlighted by bug 22144, was silently failing before those patches. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22144 [Bug 22144] Add method metadata() to Koha::Biblio -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Also, Koha::Exceptions::Metadata should include the reason of the original error. -- 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=23425 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 91948 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91948&action=edit Bug 23425: Display the MARCXML error in the Metadata::Invalid exception message -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #2)
Created attachment 91948 [details] [review] Bug 23425: Display the MARCXML error in the Metadata::Invalid exception message
Please apply this patch if you face this problem, then you should get more information about the root of the problem. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #0)
If the MARCXML data is wrong for some reasons and so MARC::Record::new_from_xml fails, a search will explodes with "invalid data, cannot decode object"
We should: - Understand why the data is wrong - Provide a maintenance script to catch problematic data - Skip the record instead of exploding (or maybe not, it will hide a data problem)
It has been highlighted by bug 22144, was silently failing before those patches.
Do you think we should move this one forward into master? -- 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=23425 Rudolf Byker <rudolfbyker@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rudolfbyker@gmail.com --- Comment #5 from Rudolf Byker <rudolfbyker@gmail.com> --- Adding the Marc XML error is great, but there is still no way to fix the marc record from the web interface when this happens. I'm not advocating that the error be hidden (bad), but the "exploding" as you call it is worse. The correct way is to tell the user what went wrong, without breaking the UI, and giving them a way to fix the data in the UI. -- 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=23425 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Rudolf Byker from comment #5)
Adding the Marc XML error is great, but there is still no way to fix the marc record from the web interface when this happens. I'm not advocating that the error be hidden (bad), but the "exploding" as you call it is worse. The correct way is to tell the user what went wrong, without breaking the UI, and giving them a way to fix the data in the UI.
I wanted first to understand why the data was wrong (encoding, badly formatted, etc.) That's why I have attached a "debug patch". Then I will provide a more global fix. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Rudolf Byker from comment #5)
Adding the Marc XML error is great, but there is still no way to fix the marc record from the web interface when this happens. I'm not advocating that the error be hidden (bad), but the "exploding" as you call it is worse. The correct way is to tell the user what went wrong, without breaking the UI, and giving them a way to fix the data in the UI.
One thing doesn't exclude the other. We need the information about the nature of the problem in order to provide a fix/workaround/recommendation. I will try to move this patch into the stable branches, and keep an eye on the feedback. -- 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=23425 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=23425 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91948|0 |1 is obsolete| | -- 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=23425 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92906 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92906&action=edit Bug 23425: Display the MARCXML error in the Metadata::Invalid exception message Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- 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=23425 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92907 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92907&action=edit Bug 23425: (QA follow-up) Keep it generic Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=23425 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | Status|Signed Off |Passed QA --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Skipping the QA step. @RM: Feel free to revert the status, I just think this is urgent and very simple. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |19.11.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=23425 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable Version(s)|19.11.00 |19.11.00,19.05.04 released in| | --- Comment #12 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- missing dependency for 18.11.x, no backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23846 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23846 [Bug 23846] bad iso 2709 record silently results in broken marcxml -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 --- Comment #14 from Rudolf Byker <rudolfbyker@gmail.com> --- Some feedback from my side after upgrading to 19.11: There is an error with this bibliographic record, the view may be degraded. Error: Invalid data, cannot decode object (id=32057, format=marcxml, schema=MARC21, decoding_error=':27: parser error : PCDATA invalid Char value 27 <subfield code="a">Kp3s�benhavn :</subfield> ^ :27: parser error : PCDATA invalid Char value 27 <subfield code="a">Kp3s�benhavn :</subfield> ^') So it looks like it has to do with how the ø in København is encoded. The book is from Denmark. Running "SELECT metadata FROM `biblio_metadata` where biblionumber=39335" reveals a MARC record that says it's encoded in UTF-8, but $260a is definitely in something other than UTF-8. With Koha 19.11, I could simply click "Edit" and re-type the problematic field, and everything works well from there. Thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 --- Comment #15 from Rudolf Byker <rudolfbyker@gmail.com> --- Although this is fixed on the /cgi-bin/koha/catalogue/detail.pl page, it's still not handled gracefully on these pages: /cgi-bin/koha/catalogue/ISBDdetail.pl /cgi-bin/koha/catalogue/MARCdetail.pl New issue? Or re-open this one? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Rudolf Byker from comment #15)
Although this is fixed on the /cgi-bin/koha/catalogue/detail.pl page, it's still not handled gracefully on these pages:
/cgi-bin/koha/catalogue/ISBDdetail.pl /cgi-bin/koha/catalogue/MARCdetail.pl
New issue? Or re-open this one?
Hi Rudolf, when in doubt always open a new bug report. Especially when the bug has been already pushed/released/closed as is the case here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23425 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24574 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24574 [Bug 24574] Broken MARC records cause "invalid data, cannot decode object" on ISBDdetail and MARCdetail pages. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org