Bug 9980

Summary: Anonymous searches in the OPAC entirely broken
Product: Koha Reporter: Jared Camins-Esakov <jcamins>
Component: SearchingAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P5 - low CC: chris, katrin.fischer, kyle, magnus
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 7740    
Bug Blocks: 8198    
Attachments: Bug 9980 : Fix for anonymous searches
Bug 9980 : Fix for anonymous searches
Bug 9980 : [SIGNED-OFF] Fix for anonymous searches
[PASSED QA] Bug 9980: Fix for anonymous searches

Description Jared Camins-Esakov 2013-04-03 10:56:22 UTC
I get the following error when I try to do a search on the OPAC without logging in:

Software error:
Can't use an undefined value as a HASH reference at /home/jcamins/kohaclone/opac/opac-search.pl line 719.
For help, please send mail to the webmaster (webmaster@koha), giving this error message and the time and date of the error.

This is caused by commit 4def1cb4 (bug 7740). The solution is to wrap the C4::Context->userenv bit in an if statement. Since we are so late in the release cycle, and reverting is easy, I will plan to revert 7740 on or about April 5 if this bug is not adopted by then.
Comment 1 Katrin Fischer 2013-04-07 07:42:32 UTC
*ping* Kyle
Comment 2 Chris Cormack 2013-04-07 07:48:06 UTC
Hmm yep this is a massive blocker, working on the fix now, otherwise bug 7740 is going to be reverted
Comment 3 Chris Cormack 2013-04-07 07:58:21 UTC Comment hidden (obsolete)
Comment 4 Magnus Enger 2013-04-07 11:08:35 UTC Comment hidden (obsolete)
Comment 5 Magnus Enger 2013-04-07 11:09:29 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2013-04-07 11:32:20 UTC
Created attachment 17252 [details] [review]
[PASSED QA] Bug 9980: Fix for anonymous searches

To test
Search in the OPAC both logged and logged out

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
When I turn off XSLT for the OPAC I can recreate the problem.
After applying the patch things work as expected for all
combinations of:
- Search results and detail view
- Logged in and not logged in
- XSLT and non-XSLT view

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, QA script and test plan.
Comment 7 Jared Camins-Esakov 2013-04-07 16:15:33 UTC
This patch has been pushed to master and 3.12.x.