Summary: | OPAC search fails when lost items are in the result set and there is no logged in user | ||
---|---|---|---|
Product: | Koha | Reporter: | Liz Rea <liz> |
Component: | OPAC | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | critical | ||
Priority: | P2 | CC: | brendan, gveranis, jonathan.druart, josef.moravec |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 17556 | ||
Bug Blocks: | |||
Attachments: |
Bug 17764: (bug 17556 follow-up) Fix search for logged out users and lost items
[SIGNED-OFF] Bug 17764: (bug 17556 follow-up) Fix search for logged out users and lost items Bug 17764: (bug 17556 follow-up) Fix search for logged out users and lost items |
Description
Liz Rea
2016-12-13 03:17:54 UTC
Created attachment 58182 [details] [review] Bug 17764: (bug 17556 follow-up) Fix search for logged out users and lost items If you are non logged-in and you the search result contain lost items, you will get: Can't call method "category" on an undefined value at /home/liz/koha-src/koha/C4/Search.pm line 2091. This is because bug 17556 assumed that $userenv was not defined when the user is logged out. Actually it is, with non defined or empty string values. Test plan: Do a search in the opac that would turn up a whole list of results (and not just that one) with the lost item included. => Without this patch you should get an error => With this patch applied you should see the search results Created attachment 58188 [details] [review] [SIGNED-OFF] Bug 17764: (bug 17556 follow-up) Fix search for logged out users and lost items If you are non logged-in and you the search result contain lost items, you will get: Can't call method "category" on an undefined value at /home/liz/koha-src/koha/C4/Search.pm line 2091. This is because bug 17556 assumed that $userenv was not defined when the user is logged out. Actually it is, with non defined or empty string values. Test plan: Do a search in the opac that would turn up a whole list of results (and not just that one) with the lost item included. => Without this patch you should get an error => With this patch applied you should see the search results Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 58261 [details] [review] Bug 17764: (bug 17556 follow-up) Fix search for logged out users and lost items If you are non logged-in and you the search result contain lost items, you will get: Can't call method "category" on an undefined value at /home/liz/koha-src/koha/C4/Search.pm line 2091. This is because bug 17556 assumed that $userenv was not defined when the user is logged out. Actually it is, with non defined or empty string values. Test plan: Do a search in the opac that would turn up a whole list of results (and not just that one) with the lost item included. => Without this patch you should get an error => With this patch applied you should see the search results Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to Master - Should be in the 17.05 release! Thanks! Dependency is not in 16.11. |