I recently upgraded the Debian package version from 19.11.03.000 to the latest 22.05.04.000 (including the underlying OS upgrades as well) and now no one is able to view any of the "Public Lists" and get a 500 error when trying. Opac-error.log shows this ("USERID" is my userid and "WEBSITE" is the hostname in the messages below): Mon Oct 24 17:44:32.268569 2022] [cgi:error] [pid 22000] [client x.x.x.x:5322] AH01215: DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single at /usr/share/koha/lib/Koha/Objects.pm line 96: /usr/share/koha/opac/cgi-bin/opac/opac-suggestions.pl [Mon Oct 24 17:44:39.651936 2022] [cgi:error] [pid 21984] [client x.x.x.x:56417] AH01215: Use of inherited AUTOLOAD for non-method Koha::Virtualshelf::haspermission() is deprecated at /usr/share/koha/lib/Koha/Virtualshelf.pm line 247.: /usr/share/koha/opac/cgi-bin/opac/opac-shelves.pl, referer: http://WEBSITE/cgi-bin/koha/opac-shelves.pl?op=list&public=1 [Mon Oct 24 17:44:39.652426 2022] [cgi:error] [pid 21984] [client x.x.x.x:56417] AH01215: Template process failed: undef error - Can't locate object method "_columns" via package "USERID" (perhaps you forgot to load "USERID"?) at /usr/share/koha/lib/Koha/Object.pm line 858.: /usr/share/koha/opac/cgi-bin/opac/opac-shelves.pl, referer: http://WEBSITE/cgi-bin/koha/opac-shelves.pl?op=list&public=1 [Mon Oct 24 17:44:39.695408 2022] [cgi:error] [pid 21984] [client x.x.x.x:56417] End of script output before headers: opac-shelves.pl, referer: http://WEBSITE/cgi-bin/koha/opac-shelves.pl?op=list <http://WEBSITE/cgi-bin/koha/opac-shelves.pl?op=list&public= 1> &public=1 I did look in the database itself and do find a count of 93 items in the 'virtualshelves' table.
(In reply to Steven Nickerson from comment #0) > [Mon Oct 24 17:44:39.651936 2022] [cgi:error] [pid 21984] [client > x.x.x.x:56417] AH01215: Use of inherited AUTOLOAD for non-method > Koha::Virtualshelf::haspermission() is deprecated at > /usr/share/koha/lib/Koha/Virtualshelf.pm line 247.: > /usr/share/koha/opac/cgi-bin/opac/opac-shelves.pl, referer: > http://WEBSITE/cgi-bin/koha/opac-shelves.pl?op=list&public=1 return 1 if $self->is_public and haspermission( $patron->userid, { lists => 'edit_public_lists' } ); This is corrected in master with: return 1 if $self->is_public and C4::Auth::haspermission( $patron->userid, { lists => 'edit_public_lists' } ); Solved on Bug 29955: Fix method import issues This fix should be backported. Trying to catch the attention of the 22.05 RMaint: Lucas Gass.
Setting the keyword for his version - agreed with Lucas on that so that he can spot those requests easier.
Created attachment 143108 [details] [review] Bug 29955: Fix method import issues This patch fixes this: $ prove t/db_dependent/Utils/Datatables_Virtualshelves.t t/db_dependent/Utils/Datatables_Virtualshelves.t .. 2/13 Use of inherited AUTOLOAD for non-method Koha::Virtualshelf::haspermission() is no longer allowed at /kohadevbox/koha/Koha/Virtualshelf.pm line 248. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 143109 [details] [review] Bug 29955: Fix method import issues This patch fixes this: $ prove t/db_dependent/Utils/Datatables_Virtualshelves.t t/db_dependent/Utils/Datatables_Virtualshelves.t .. 2/13 Use of inherited AUTOLOAD for non-method Koha::Virtualshelf::haspermission() is no longer allowed at /kohadevbox/koha/Koha/Virtualshelf.pm line 248. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> https://bugs.koha-community.org/show_bug.cgi?id=32080 Signed-off-by: Blou <blou@inlibro.com>
I attached the REBASED patch from Bug 29955 that fixed it for me in 22.05.06. Not sure if RM want to put it as-is, or rename it or ... So I signed it off, as it works for me. Marcel/QA can validate if it makes sense.
(In reply to Blou from comment #5) > I attached the REBASED patch from Bug 29955 that fixed it for me in 22.05.06. > > Not sure if RM want to put it as-is, or rename it or ... > So I signed it off, as it works for me. Marcel/QA can validate if it makes > sense. Looks good to me. Will change status so that RMaint can pick it up.
Thanks all, this is backported to 22.05.x for upcoming 22.05.07 release