[Bug 42681] New: (Bug 34971 follow-up) serials/serials-collection.pl generates error 500
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42681 Bug ID: 42681 Summary: (Bug 34971 follow-up) serials/serials-collection.pl generates error 500 Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org CC: baptiste.wojtkowski@biblibre.com Depends on: 34971 When working with subscription without superlibrarian permissions the page /cgi-bin/koha/serials/serials-collection.pl?subscriptionid=NNN generates error 500 with an entry: Can't use string ("NNN") as a HASH ref while "strict refs" in use at /usr/share/koha/lib/C4/Serials.pm line 2792. in plack-error.log. This is because can_edit_subscription called in serials/serials-collection.pl (line ~234) requires a hash reference containing data from the subscription table (or an unblessed Koha::Subscription object), and not subscriptionid. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34971 [Bug 34971] Closing a subscription should require edit_subscription permission -- 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=42681 Matthias Berland <matthias.berland@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthias.berland@bulac.fr --- Comment #1 from Matthias Berland <matthias.berland@bulac.fr> --- We have the same problem. We are in 24.11 but I also tested in 26.06 and it still does not work. With IndependentBranches, one must have superserials in order for it to work. Can't use string ("24") as a HASH ref while "strict refs" in use at /kohadevbox/koha/C4/Serials.pm line 2802. at /kohadevbox/koha/C4/Serials.pm line 2791 in C4::Serials::_can_do_on_subscription at /kohadevbox/koha/C4/Serials.pm line 2791 2788: my $flags = C4::Context->userenv->{flags}; 2789: $userid ||= C4::Context->userenv->{'id'}; 2790: 2791: if ( C4::Context->preference('IndependentBranches') ) { 2792: return 1 2793: if C4::Context->IsSuperLibrarian() 2794: or C4::Auth::haspermission( $userid, { serials => 'superserials' } ) -- 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=42681 Amaury GAU <amaury.gau@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amaury.gau@bulac.fr -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org