[Koha-bugs] [Bug 9578] Error when search and sort not on relevance

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 6 12:57:42 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9578

--- Comment #4 from Marc Véron <veron at veron.ch> ---
Created attachment 25891
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=25891&action=edit
[Signed-off] Bug 9578 - Error when search and sort not on relevance

When searching with a sort (means not by relevance) and there is an error in
Zebra connexion (server is down or query is wrong), you get the message :
  Error : Can't call method "sort" on an undefined value at
/home/kohaadmin/src/C4/Search.pm line 405.

This patch corrects by not performing sort if no results.

Steps to reproduce the error without patch:

In OPAC go to Advanced Search
Choose "Title" in first "Search for:" end enter fgdfgdfgdggdg (Exam 70-433)
Display "More options"
Set "Sort by" to "Title (A-Z)"
Click "Search" at bootom of page

Result:
Error:
Can't call method "sort" on an undefined value at
/usr/share/kohaclone/C4/Search.pm line 430.

Test plan :
- Set OPACdefaultSortField on something else than relevance
- Perform a simple search with a wrong CCL query. For example : ccl=( and )
=> You get the messge : No results found ...

Patch behaves as expected.
Signed-off-by: Marc Véron <veron at veron.ch>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list