[Bug 3711] New: Intermittent search error in OPAC
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3711 Summary: Intermittent search error in OPAC Product: Koha Version: rel_3_0 Platform: PC OS/Version: Windows 2000 Status: ASSIGNED Severity: major Priority: P3 Component: OPAC AssignedTo: jwagner@ptfs.com ReportedBy: jwagner@ptfs.com Estimated Hours: 0.0 Change sponsored?: --- I've been having an intermittent script error in OPAC searching that refers to opac-tmpl/prog/en/lib/jquery/plugins/jquery.highlight-3.js:38 and complains that 'data' is null or not an object. I thought this was related to Bug 3589, since it seemed to be related to highlighting, but that was misleading. After much troubleshooting on the IRC with Owen Leonard (THANKS!), I tracked the problem to a search term that begins with a space. For example, from the page source: <input type="hidden" name="q" value="seasons"/> <input type="hidden" name="q" value=" seasons"/> The second case triggers the error; the first doesn't. Testing by manually searching for a term beginning with a space always triggers the error. I added a couple of lines to opac-search.pl to check for leading and trailing spaces in the query and remove them: ## I. BUILD THE QUERY ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by); $query_desc =~ s/^\s+//; # removes leading space $query_desc =~ s/\s+$//; # removes trailing space That seems to fix the problem. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3711 Jane Wagner <jwagner@ptfs.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |PATCH-Sent --- Comment #1 from Jane Wagner <jwagner@ptfs.com> 2009-10-14 15:45:07 --- Patch sent October 14, 2009. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3711 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #2 from Galen Charlton <gmcharlt@gmail.com> 2010-05-10 21:53:59 --- This appears to be resolved in commit 4cc7b7e59da9f58e14e48e896941057e61e41437 . Please test and close. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3711 Jane Wagner <jwagner@ptfs.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #3 from Jane Wagner <jwagner@ptfs.com> 2010-05-12 13:46:42 --- Seems to be fixed. This patch (in ptfs-harley) can be pulled from the public git repository at http://github.com/Koha-PTFS, branch Bug 3711 if needed. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla-daemon@kohaorg.ec2.liblime.com