[Bug 40555] New: Items with empty itemtype causes Preservation module to crash
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40555 Bug ID: 40555 Summary: Items with empty itemtype causes Preservation module to crash Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: pedro.amorim@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com We've hit this recently on our demo installation, but I believe we've stumbled upon this in the past in different parts of Koha that may interact with Items (and Bookings, by extension). -- 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=40555 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@openfifth.co.u | |k --- Comment #1 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- The error log message is the following: GET /api/v1/preservation/waiting-list/items: unhandled exception (Mojo::Exception)<<Can't call method "bookable" on an undefined value at /usr/share/koha/lib/Koha/Item.pm line 1929.>> Produced when accessing: <staff_url>/cgi-bin/koha/preservation/waiting-list With one or more (?) items without an itemtype (or itype, depending on preference?) More analysis required. -- 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=40555 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40555 Pedro Amorim <pedro.amorim@openfifth.co.uk> 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=40555 --- Comment #2 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Created attachment 184897 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184897&action=edit Bug 40555: Consider possibility of item not having itemtype on effective_bookable -- 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=40555 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Circulation| |Bookings function| | -- 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=40555 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- IMO This is invalid. We have discussed on bug 33166 (and others) and decided that we should not deal with corrupted data. The bug here is to have the column null at the DB level. -- 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=40555 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33166 -- 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=40555 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk, tomascohen@gmail.com --- Comment #4 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Adding others to the discussion here. Can we please agree on a solution. We keep getting customers experiencing the issue fixed by this patch, this time when showing the items table on cgi-bin/koha/catalogue/detail.pl -- 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=40555 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Pedro Amorim from comment #4)
Adding others to the discussion here. Can we please agree on a solution. We keep getting customers experiencing the issue fixed by this patch, this time when showing the items table on cgi-bin/koha/catalogue/detail.pl
See bug 40777, this is the solution we should bring to end-users IMO. -- 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=40555 --- Comment #6 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- At this point the bug title and submitted patch may no longer be 100% accurate, but these issues are all coming from the fact that an item does not have an item type set. To reproduce: 1) MARC21: Add 'TEST' as default value for 952$y for 'Fast add framework', handy link: <staff_url>/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=952&tagsubfield=y&frameworkcode=FA#subyfield 2) Go to any record: <staff_url>/cgi-bin/koha/catalogue/detail.pl?biblionumber=76 3) Click 'Edit' -> 'Edit record'. Click 'Settings' and pick 'Fast add framework'. Click 'Save'. 4) Click 'New' -> 'New Item'. Notice the default value says 'Not an authorised value' but still lets you save. Click 'Save'. 5) Visit the same record again (repeat 2). 6) You get a table error, log error is the following: GET /api/v1/biblios/76/items: unhandled exception (Mojo::Exception)<<Can't call method "notforloan" on an undefined value at /kohadevbox/koha/Koha/Item.pm line 1556.>> -- 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=40555 --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- Yes, this is data inconsistency. We discussed it several times over the last years. We should not deal with those cases in the code, but prevent them to appear instead. Or at least tell the librarians something is not good in the data. That's why we have the search_for_data_inconsistencies script, and why I am suggesting to port the output to the UI on bug 40777. Another long term solution is to prevent such problems when saving a record, or editing/deleting an authorised value. -- 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=40555 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Items with empty itemtype |Items with empty itemtype |causes Preservation module |cause issues |to crash | Status|Needs Signoff |In Discussion --- Comment #8 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- These are my suggestions on how to handle this problem: 1) 'MARC bibliographic framework test' needs to notify if a default value of a MARC framework does not match at least one value of the configured auth_val list. It doesn't do this currently. 2) About page 'System information' needs to at least have a message saying 'One or more items with an empty itemtype were found'. It doesn't do this currently. 3) When configuring the MARC framework, only allow a value that is part of the configured auth_val list to be set as default, not a free text input. 4) Finally, when adding a new item to a bib record, when the fallback to the configured default happens, verify, at that time, that the default value is actually an element of the configured auth_val list. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org