Bug 9087

Summary: In Search.pl if there is parenthesis in itemcallnumber the link is broken
Product: Koha Reporter: Christophe Croullebois <christophe.croullebois>
Component: SearchingAssignee: Christophe Croullebois <christophe.croullebois>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P5 - low CC: chris, kyle, melia
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: proposed patch

Description Christophe Croullebois 2012-11-15 10:26:44 UTC
The search with parenthesis in 'q=xxxxx(x)xx' raises an error message "Can't call method "sort" on an undefined value at /home/koha/src/C4/Search.pm line 404."
The easier way to solve this problem is to put quotes for the query, q="xxxx(x)xx"
Comment 1 Christophe Croullebois 2012-11-15 11:11:18 UTC
Created attachment 13458 [details] [review]
proposed patch

To test, do a search, in the search.pl, find a line with parenthesis in itemcallnumber eg: [EMP 133.620 (1) CCL.5294] and click on the link, without patch you'll have an error message.
With the patch, the link is ok, an you can see the request as:
cgi-bin/koha/catalogue/search.pl?idx=callnum&q="EMP 133.620 (1) CCL.5294"
Comment 2 Melia Meggs 2012-11-16 20:36:16 UTC
I wanted to test this, but I can't seem to reproduce that error message on master.

I did a search for an item that has call number [AR EUch (Thu) 1974], but I don't get any error message when I click on it in the staff client or the OPAC.
Comment 3 Kyle M Hall 2012-11-21 13:59:41 UTC
I too am unable to reproduce this on master.
Comment 4 Owen Leonard 2013-09-13 19:06:28 UTC
I'm marking this invalid since it's been a year and no one has been able to reproduce.