Bugzilla – Attachment 135456 Details for
Bug 30844
The OPAC detail page's browser is limited to the current page of results when using Elasticsearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30844: The OPAC detail page's browser is limited to the current page of results when using Elasticsearch
Bug-30844-The-OPAC-detail-pages-browser-is-limited.patch (text/plain), 2.72 KB, created by
David Nind
on 2022-05-31 02:11:59 UTC
(
hide
)
Description:
Bug 30844: The OPAC detail page's browser is limited to the current page of results when using Elasticsearch
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-05-31 02:11:59 UTC
Size:
2.72 KB
patch
obsolete
>From 6fe5af33e5a2dc87e5bcf79d82749a81274e01ee Mon Sep 17 00:00:00 2001 >From: Kevin Carnes <kevin.carnes@ub.lu.se> >Date: Wed, 25 May 2022 10:54:25 +0000 >Subject: [PATCH] Bug 30844: The OPAC detail page's browser is limited to the > current page of results when using Elasticsearch > >When viewing the detail page of the first or last record of a result page, >it's not possible to browse to another page when using Elasticsearch. > >To test: >1) Search for "*" in the OPAC >2) Click on the last result of the page >3) Observe that you cannot browse to the next page >4) Apply the patch >5) Search for "*" in the OPAC >6) Click on the last result of the page >7) Observe that you can browse to the next page >8) Sign off > >Sponsored-by: Lund University Library > >Signed-off-by: David Nind <david@davidnind.com> >--- > opac/opac-detail.pl | 5 ++++- > opac/opac-search.pl | 2 +- > 2 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index b281c958f6..7b08e67832 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -86,6 +86,7 @@ use Koha::Reviews; > use Koha::SearchEngine::Search; > use Koha::SearchEngine::QueryBuilder; > >+use JSON qw( decode_json ); > > my $query = CGI->new(); > >@@ -247,7 +248,9 @@ if ($session->param('busc')) { > $sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by); > my ($error, $results_hashref, $facets); > eval { >- ($error, $results_hashref, $facets) = getRecords($arrParamsBusc->{'query'},$arrParamsBusc->{'simple_query'},\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes,$arrParamsBusc->{'query_type'},$arrParamsBusc->{'scan'}); >+ my $searcher = Koha::SearchEngine::Search->new( >+ { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); >+ ($error, $results_hashref, $facets) = $searcher->search_compat(decode_json($arrParamsBusc->{'query'}),$arrParamsBusc->{'simple_query'},\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes,$arrParamsBusc->{'query_type'},$arrParamsBusc->{'scan'}); > }; > my $hits; > my @newresults; >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 15fd6e52d2..a1f0a14487 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -561,7 +561,7 @@ if ($tag) { > # displays search results which should be hidden. > # FIXME: No facets for tags search. > } else { >- $pasarParams .= '&query=' . uri_escape_utf8($query); >+ $pasarParams .= '&query=' . uri_escape_utf8(encode_json($query)); > $pasarParams .= '&count=' . uri_escape_utf8($results_per_page); > $pasarParams .= '&simple_query=' . uri_escape_utf8($simple_query); > $pasarParams .= '&query_type=' . uri_escape_utf8($query_type) if ($query_type); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30844
:
135336
|
135456
|
135727
|
135807
|
135852
|
135853