Bug 32080 - Public lists not available after recent upgrade
Summary: Public lists not available after recent upgrade
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: 22.05
Hardware: All Linux
: P5 - low major (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-03 00:41 UTC by Steven Nickerson
Modified: 2023-06-08 22:32 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 29955: Fix method import issues (1.69 KB, patch)
2022-11-03 12:47 UTC, Blou
Details | Diff | Splinter Review
Bug 29955: Fix method import issues (1.73 KB, patch)
2022-11-03 12:51 UTC, Blou
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Nickerson 2022-11-03 00:41:50 UTC
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.
Comment 1 Marcel de Rooy 2022-11-03 07:24:37 UTC
(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.
Comment 2 Katrin Fischer 2022-11-03 07:29:04 UTC
Setting the keyword for his version - agreed with Lucas on that so that he can spot those requests easier.
Comment 3 Blou 2022-11-03 12:47:16 UTC
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>
Comment 4 Blou 2022-11-03 12:51:37 UTC
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>
Comment 5 Blou 2022-11-03 12:52:35 UTC
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.
Comment 6 Marcel de Rooy 2022-11-03 13:45:37 UTC
(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.
Comment 7 Lucas Gass 2022-11-10 23:56:32 UTC
Thanks all, this is backported to 22.05.x for upcoming 22.05.07 release