Renewing books from circ/renew.pl produces an internal server error with the following entry in the logs: ("Can't locate object method \"single\" via package \"5\" (perhaps "...) called at /var/koha/circ/renew.pl line 57 mveron confirmed this impacts the master branch as well.
This is critical. It looks like a bad side effect of bug 13790. Still investigating...
Found soultion, patch follows.
Created attachment 46242 [details] [review] Bug 15462 - Unable to renew books via circ/renew.pl To verify: Got to circ/circulation.pl and try to renew an item. Result: Can't call method "single" without a package or object reference at /usr/share/kohaclone/circ/renew.pl line 57 To test: - Apply patch - Try to renow items that are or are not checked out. Error no longer occurs.
For the record, it has been introduced by commit 3cab4d1efd25268441c88ce74d5a4b568773c8aa Bug 14978: (RM followup) DBIx update Bug 14978 introduced a unique on items.itemnumber to get the constraint we had before bug 13790. With adding this constraint, DBIx::Class::Schema::Loader renamed the has_many issues RS with a might_have issue. +__PACKAGE__->might_have( + "issue", -__PACKAGE__->has_many( - "issues",
Created attachment 46243 [details] [review] Bug 15462 - Unable to renew books via circ/renew.pl To verify: Got to circ/circulation.pl and try to renew an item. Result: Can't call method "single" without a package or object reference at /usr/share/kohaclone/circ/renew.pl line 57 To test: - Apply patch - Try to renow items that are or are not checked out. Error no longer occurs. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch fixed it. Thank you!
Created attachment 46346 [details] [review] [PASSED QA] Bug 15462 - Unable to renew books via circ/renew.pl To verify: Got to circ/circulation.pl and try to renew an item. Result: Can't call method "single" without a package or object reference at /usr/share/kohaclone/circ/renew.pl line 57 To test: - Apply patch - Try to renew items that are or are not checked out. Error no longer occurs. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master - Thanks.
Patch pushed to 3.22.x, will be in 3.22.2
This patch has been pushed to 3.20.x, will be in 3.20.8.