When you do a search that has multiple page results in cataloging, if you do that search in quotations it will not allow you to advance the page.
Using double quotes, subsequent pages were 'blank'. Singles quotes did not break the paging, but did make the reservoir search come up empty. https://monosnap.com/file/H3n9b1Xncd7UAGhTrkcOzv0XgSc2sH
Created attachment 96264 [details] [review] Bug 24236: Fix pagination to use query_cgi This is still wrong, we should use page-numbers.inc, but that is a larger refactoring This patch fixes non-QueryParser searches by simple getting an using the escaped query (query_cgi) For QueryParser, we do what the QP code does, just uri escape the query - the way that SimpleSearch does the query parsing instead of the usual buildQuery suggest to me that we should probably switch all of this to use the general Zebra search. The issues with reservoir should be their own bug To test: 1 - Search for cat in cataloging search 2 - Get results and see you can paginate 3 - Search for "cat" 4 - Get results but subsequent pages empty 5 - Apply patch 6 - Repeat search for "cat" 7 - You can paginate 8 - Enable UseQueryParser syspref (don't worry about installing) 9 - Confirm can still search with quotes and paginate
I cannot replicate the problem. Please provide further direction for testing. Testing system = koha-testing-docker Versions tested = master, 19.11.x, 19.05.x Search engine = Zebra Search query = cat >> can page through results Search query = "cat" >> can page through results
(In reply to Myka Kennedy Stephens from comment #3) > I cannot replicate the problem. Please provide further direction for testing. > > Testing system = koha-testing-docker > Versions tested = master, 19.11.x, 19.05.x > Search engine = Zebra > Search query = cat >> can page through results > Search query = "cat" >> can page through results I I try search for "a" I end up at this URL: http://localhost:8081/cgi-bin/koha/cataloguing/addbooks.pl?q=%22a%22 I cannot page forward from there, I get blank pages If i hit: http://localhost:8081/cgi-bin/koha/cataloguing/addbooks.pl?q=a then I can page
Created attachment 97407 [details] [review] Bug 24236: Fix pagination to use query_cgi This is still wrong, we should use page-numbers.inc, but that is a larger refactoring This patch fixes non-QueryParser searches by simple getting an using the escaped query (query_cgi) For QueryParser, we do what the QP code does, just uri escape the query - the way that SimpleSearch does the query parsing instead of the usual buildQuery suggest to me that we should probably switch all of this to use the general Zebra search. The issues with reservoir should be their own bug To test: 1 - Search for cat in cataloging search 2 - Get results and see you can paginate 3 - Search for "cat" 4 - Get results but subsequent pages empty 5 - Apply patch 6 - Repeat search for "cat" 7 - You can paginate 8 - Enable UseQueryParser syspref (don't worry about installing) 9 - Confirm can still search with quotes and paginate Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 97413 [details] [review] Bug 24236: Fix pagination to use query_cgi This is still wrong, we should use page-numbers.inc, but that is a larger refactoring This patch fixes non-QueryParser searches by simple getting an using the escaped query (query_cgi) For QueryParser, we do what the QP code does, just uri escape the query - the way that SimpleSearch does the query parsing instead of the usual buildQuery suggest to me that we should probably switch all of this to use the general Zebra search. The issues with reservoir should be their own bug To test: 1 - Search for cat in cataloging search 2 - Get results and see you can paginate 3 - Search for "cat" 4 - Get results but subsequent pages empty 5 - Apply patch 6 - Repeat search for "cat" 7 - You can paginate 8 - Enable UseQueryParser syspref (don't worry about installing) 9 - Confirm can still search with quotes and paginate Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: George Williams <george@nekls.org>
Created attachment 97657 [details] [review] Bug 24236: Fix pagination to use query_cgi This is still wrong, we should use page-numbers.inc, but that is a larger refactoring This patch fixes non-QueryParser searches by simple getting an using the escaped query (query_cgi) For QueryParser, we do what the QP code does, just uri escape the query - the way that SimpleSearch does the query parsing instead of the usual buildQuery suggest to me that we should probably switch all of this to use the general Zebra search. The issues with reservoir should be their own bug To test: 1 - Search for cat in cataloging search 2 - Get results and see you can paginate 3 - Search for "cat" 4 - Get results but subsequent pages empty 5 - Apply patch 6 - Repeat search for "cat" 7 - You can paginate 8 - Enable UseQueryParser syspref (don't worry about installing) 9 - Confirm can still search with quotes and paginate Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nice work everyone! Pushed to master for 20.05
Pushed to 19.11.x branch for 19.11.03
backported to 19.05.x for 19.05.08
Is someone able to also test 18.11.x for the presence of this bug? I have tested, and I am able to paginate with results still coming up even when searching with "cat".
(In reply to Hayley Mapley from comment #11) > Is someone able to also test 18.11.x for the presence of this bug? > > I have tested, and I am able to paginate with results still coming up even > when searching with "cat". I do recreate with "cat" with the double quote :) Page 2 link is /cgi-bin/koha/cataloguing/addbooks.pl?q= With the patch (it applies correctly on 18.11.x), I get /cgi-bin/koha/cataloguing/addbooks.pl?idx=kw&q=%22cat%22&page=2