Click a subject link such as "SAS (Computer program language)" gives the error: Error: Can't call method "sort" on an undefined value at /home/koha/kohaclone/C4/Search.pm line 404.
Created attachment 13887 [details] [review] Bug 9212 - Parentheses in subject headings break search
You don't say what the context for this error is--OPAC or staff client, XSLT or non-XSLT--but I can't reproduce the error. I tested with this record: http://lccn.loc.gov/2011019323
I'm marking this as failed QA simply because it's not testable without more details. Please resubmit the patch with a detailed commit message including a test plan.
(In reply to comment #0) > Click a subject link such as "SAS (Computer program language)" gives the > error: > > Error: > Can't call method "sort" on an undefined value at > /home/koha/kohaclone/C4/Search.pm line 404. Our library has the same issue. We have upgraded to 3.10 and when clicking on, for example, Ellis Island Immigration Station (N.Y. and N.J.), we get the following error message: Error: Can't call method "sort" on an undefined value at /home/koha/kohaclone/C4/Search.pm line 407.
Test Plan: 1) In the OPAC, try clicking a subject link that contains parentheses, you should get an error 2) Apply the patch 3) Repeat step 1, this time it should work correctly.
(In reply to comment #5) > Test Plan: > 1) In the OPAC, try clicking a subject link that contains parentheses, you > should get an error > 2) Apply the patch > 3) Repeat step 1, this time it should work correctly. I applied the patch and repeated step 1. Problem was not solved. :-(
Created attachment 16043 [details] [review] Bug 9212 - Parentheses in subject headings break search Subjects links for subjects with parentheses will not give any results. Test Plan: 1) In the OPAC, try clicking a subject link that contains parentheses, you should get an error 2) Apply the patch 3) Repeat step 1, this time it should work correctly.
Created attachment 16105 [details] [review] Bug 9212 - Parentheses in subject headings break search Subjects links for subjects with parentheses will not give any results. Test Plan: 1) In the OPAC, try clicking a subject link that contains parentheses, you should get an error 2) Apply the patch 3) Repeat step 1, this time it should work correctly. Signed-off-by: Liz Rea <liz@catalyst.net.nz> Tested per plan, without the patch I didn't get the sort error, but I did get "result not found" With the patch, I came back to my same record. I take this as an indicator that the patch is working.
The subject heading I had added was Customer Relations (nonsense) in a 650a
QA: Looking at this one now.
QA Comment: This is marked trivial, but it appears to be not that trival at all :) Patch complexity is not about the size only.. Liz: If you tested a 650, did you check if it was no an:xxx-link? I tested with 653s for that reason. The behavior of this patch depends on several pref values, including UseICU and TraceSubjectSubdivisions, and OPAC XSLT. When the tracing quotes {|} are disabled, the normal quotes are doubled in the XSLT searches leading to the famous: Can't call method "sort" on an undefined value at /usr/share/koha/testclone/C4/Search.pm line 422. Note that before the patch, this search would have worked! Also I feel that this report should also include the search at staff side. A similar change should be made in intranet xslt and normal view to be consistent. Note that now the search in previous example works under staff with two quotes and does not work in opac with four quotes.. Failed QA
The search is not broken on the staff side - and it seems that the same thing happens with Author authorities as well as subjects, I discovered today.
*** Bug 8783 has been marked as a duplicate of this bug. ***
Sorry, I missed this at first glance and created bug 13650, which is a different approach to fixing this that seems to avoid the problems Marcel found nicely. I tested with different variations of TraceCompleteSubfields and TraceSubjectSubdivisions and didn't find any problems. Marking this duplicate. *** This bug has been marked as a duplicate of bug 13650 ***