[Bug 33982] New: Error 500 on OPAC on recently edited records
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33982 Bug ID: 33982 Summary: Error 500 on OPAC on recently edited records Change sponsored?: --- Product: Koha Version: 22.11 Hardware: All OS: Linux Status: NEW Severity: critical Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: joseanjos@gmail.com QA Contact: testopia@bugs.koha-community.org Since I update from version 22.05 to 22.11, every record I edit on Staff interface, can't be searched anymore on OPAC. (ERROR 500) I've updated to 23.05 but the problem persists. On Staff interface I can search it. opac-error.log: [Mon Jun 12 10:25:29.952048 2023] [cgi:error] [pid 6040] [client XX.XX.XX.XX:48968] AH01215: Use of uninitialized value in hash element at /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl line 678.: /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl [Mon Jun 12 10:25:29.952589 2023] [cgi:error] [pid 6040] [client XX.XX.XX.XX:48968] AH01215: DBIC result _type isn't of the _type Branch at /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl line 678.: /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl [Mon Jun 12 10:25:29.987521 2023] [cgi:error] [pid 6040] [client XX.XX.XX.XX:48968] End of script output before headers: opac-detail.pl I've checked for permissions issues but everything looks OK. Rebuild Zebra: koha-rebuild-zebra -b -f -v koha looks OK, no errors -- 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=33982 --- Comment #1 from José Anjos <joseanjos@gmail.com> --- If I delete all Items, the search in OPAC works. If I add the Item, the error 500 come again. -- 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=33982 José Anjos <joseanjos@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal --- Comment #2 from José Anjos <joseanjos@gmail.com> --- After some more tests... The problem is the field: 995$o Circulation type (not for loan) items.notforloan connected to Authorized values for category: NOT_LOAN I have to edit the Item, clean the field and save. Then the search on OPAC is OK. -- 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=33982 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Your items are missing mandatory fields. You need to make sure that all of these are set in all your items: 952$a items.homebranch 952$b items.holdingbranch 952$y items.itype Koha won't function correctly if any of these are missing. -- 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=33982 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm if you are UNIMARC other MARC fields apply (missed that you wrote you have 995) If you edit an item, you might not see if the field is empty (defaults might apply). Better probably to double check using SQL/reports. This points to an issue with the branch: AH01215: DBIC result _type isn't of the _type Branch at /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl line 678.: /usr/share/koha/opac/cgi-bin/opac/opac-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=33982 José Anjos <joseanjos@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |FIXED --- Comment #5 from José Anjos <joseanjos@gmail.com> --- Katrin Fischer, thank you for your help. It seams that was missing Holding Branch on that Items. Its strange because if I edited any record and just save it, without doing any change, that Item would give a Error 500 on OPAC search. Now (maybe since 23.05 or restart) that problem stopped. -- 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=33982 Oleg Vasylenko <synapse.ova@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |synapse.ova@gmail.com --- Comment #6 from Oleg Vasylenko <synapse.ova@gmail.com> --- Our library had same problem after upgrading to Koha 23.05. Thank you for pointing the reason for such a problem. -- Diagnosing the problem -- Run SQL queries: SELECT holdingbranch, count(*) FROM items GROUP BY holdingbranch; SELECT homebranch, count(*) FROM items GROUP BY homebranch; — there should be no NULL records -- Solving the problem -- If you have just one library it is easy to solve the problem with the following SQL queries (change LIBCODE with your library code): UPDATE items SET homebranch = "LIBCODE" WHERE homebranch IS NULL; UPDATE items SET holdingbranch = "LIBCODE" WHERE holdingbranch IS NULL; -- Securing from future problems -- Edit MARC frameworks and make subfields with Koha connection items.homebranch, items.holdingbranch, items.itype mandatory. Subfields for MARC21 are provided above. For UNIMARC these are probably 995$b, 995$c, 995$r (at least in our case) Similar queries could be added to Koha health check to show possible problems in DB -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org