Bug 32075 - Staff mainpage crashed on Can't use an undefined value as a HASH reference
Summary: Staff mainpage crashed on Can't use an undefined value as a HASH reference
Status: RESOLVED DUPLICATE of bug 31908
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 32124
  Show dependency treegraph
 
Reported: 2022-11-02 13:19 UTC by Marcel de Rooy
Modified: 2022-11-08 12:57 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2022-11-02 13:19:43 UTC
Found under 21.11
Can't use an undefined value as a HASH reference at /usr/share/koha/mainpage.pl line 87
Log shows:
[02/Nov/2022:08:36:51 +0100] "POST /intranet/mainpage.pl HTTP/1.1" 500 41624 

Line 87:
    my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count();

Note: In master this is line 88.

Apparently there is no user context. So no branch key. But when you get here, you came thru Auth.pm. So we should expect one?

Could not find a way to reproduce this one yet.
Comment 1 Marcel de Rooy 2022-11-08 12:57:53 UTC

*** This bug has been marked as a duplicate of bug 31908 ***