Bug 8381 - Paging broken in OPAC search results
Summary: Paging broken in OPAC search results
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P1 - high blocker (vote)
Assignee: Alex Arnaud
QA Contact: Mason James
URL:
Keywords:
Depends on:
Blocks: 5981
  Show dependency treegraph
 
Reported: 2012-07-07 15:42 UTC by Jared Camins-Esakov
Modified: 2019-06-27 09:24 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 8381 - Paging broken in OPAC search results (1.73 KB, patch)
2012-07-13 09:21 UTC, Alex Arnaud
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8381 - Paging broken in OPAC search results (1.90 KB, patch)
2012-07-14 09:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 8381: Fix adding limits to search history for logged in users (1.17 KB, patch)
2012-07-14 09:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
[Signed-off] Bug 8381: Fix adding limits to search history for logged in users (1.24 KB, patch)
2012-07-16 09:25 UTC, Alex Arnaud
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Camins-Esakov 2012-07-07 15:42:41 UTC
The paging in the OPAC search results is now very broken: if you use the next link instead of choosing specific pages, you will be unable to get past page 2, and end up with a query string like this: /cgi-bin/koha/opac-search.pl?q=smith&offset=20&offset=40&offset=40
Comment 1 Jared Camins-Esakov 2012-07-07 15:51:05 UTC
This is also an issue in 3.8.x.
Comment 2 Jared Camins-Esakov 2012-07-07 15:56:36 UTC
Problem caused by commit b20ffe15bb365a14fbe20956f038670fe77044ae, Bug 5981 - OPAC: Add limits to search history
Comment 3 Chris Cormack 2012-07-07 18:17:11 UTC
Commit is reverted out of 3.8.x now, thanks for the catch
Comment 4 Paul Poulain 2012-07-09 11:53:29 UTC
Alex, I'm assigning this bug to you, because you're author of the patch that caused it, see bug 5981.

I confirm that the following lines are the origin of the problem:
+            my $path_info = $cgi->url(-path_info=>1);
+            $query_cgi = $cgi->url(-query=>1);
+            $query_cgi =~ s/^$path_info\?//;
+            $query_cgi =~ s/;/&/g;
+            $query_desc .= ", $limit_desc";

I've commented them, and the problem described here is gone. Uncommenting them, the problem is back.

I can't reproduce Katrin problem described on http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5981#c28, but thi one 8381 is a bug, for sure

As your original bugfix contained an updatedatabase, I won't revert it, that would mean creating a "hole" in DB revision numbers, but please fix the problem quickly !
Comment 5 Alex Arnaud 2012-07-13 09:21:49 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2012-07-14 09:39:04 UTC
Created attachment 10836 [details] [review]
[SIGNED-OFF] Bug 8381 - Paging broken in OPAC search results

Fix also freezing for some browser when performing a search query.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked paging (previous, next and navigating to page numbers) works.
Browser performance is fixed too.
Comment 7 Katrin Fischer 2012-07-14 09:39:17 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2012-07-14 09:41:20 UTC
Alex's patch works nicely, but I found a small problem and I would like to see a second sign off on this, because my symptoms were different from what other testers experienced.
Comment 9 Alex Arnaud 2012-07-16 09:25:15 UTC
Created attachment 10867 [details] [review]
[Signed-off] Bug 8381: Fix adding limits to search history for logged in users

Due to renaming of some variables the limits were only working for 'anonymous'
users. This patch fixes some variables, so limits are also added to history
when the user is logged in.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 10 Mason James 2012-07-16 23:06:02 UTC
(In reply to comment #6)
> Created attachment 10836 [details] [review]
> [SIGNED-OFF] Bug 8381 - Paging broken in OPAC search results
> 
> Fix also freezing for some browser when performing a search query.

what browser?
Comment 11 Mason James 2012-07-16 23:15:12 UTC
(In reply to comment #10)
> (In reply to comment #6)
> > Created attachment 10836 [details] [review]
> > [SIGNED-OFF] Bug 8381 - Paging broken in OPAC search results
> > 
> > Fix also freezing for some browser when performing a search query.
> 
> what browser?

works fine for me in safari, opera, firefox and chrome

passes all QA tests. i'm marking this as 'Passed QA'
Comment 12 Paul Poulain 2012-07-17 13:17:52 UTC
I made a lot of tests (logged-in and not logged-in), and could not find anything wrong. chris_c, you can push bug 5981 and this one on 3.8.x branch I think
Comment 13 Jared Camins-Esakov 2012-07-17 16:17:32 UTC
Either this patch or the patch to bug 5981 has broken the OPAC search in Chrome. With EnableOPACSearchHistory enabled, Chrome crashes on a regular keyword search (q=smith), and hangs on searches using idx=kw&q=smith. Disabling EnableOPACSearchHistory fixes the problem.
Comment 14 Chris Cormack 2012-07-18 07:50:44 UTC
Holding off pushing until the problem with chrome is fixed
Comment 15 Chris Cormack 2012-08-24 02:18:08 UTC
Jared, is this still a problem in chrome?
Comment 16 Jared Camins-Esakov 2012-08-24 02:31:45 UTC
(In reply to comment #15)
> Jared, is this still a problem in chrome?

It doesn't seem to be. I don't have time to do a git bisect, but in between July 17 and now, EnableOPACSearchHistory stopped causing Chrome to hang (this time around Chrome did not crash for me).
Comment 17 Magnus Enger 2012-11-21 09:21:58 UTC
I tested searching in Chromium "20.0.1132.47 Ubuntu 12.04 (144678)", with and without EnableOPACSearchHistory, and did not see any problems. Someone with access to Chrome should probably test too, before we close this.
Comment 18 Jared Camins-Esakov 2012-11-21 11:12:55 UTC
Closing because the bug is no longer reproducible on master.