Summary: | 404.pl redirect for single, hidden result makes no sense. | ||
---|---|---|---|
Product: | Koha | Reporter: | Mark Tompsett <mtompset> |
Component: | OPAC | Assignee: | Mark Tompsett <mtompset> |
Status: | RESOLVED DUPLICATE | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | cbrannon, gmcharlt, jonathan.druart, sandboxes |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11489 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 11432 - 404.pl redirect for single, hidden result makes no sense.
Bug 11432 - 404.pl redirect for single, hidden result makes no sense. Bug 11432 - 404.pl redirect for single, hidden result makes no sense. Bug 11432: Show facets only if there is result to display [SIGNED OFF] Bug 11432: Show facets only if there is result to display |
Description
Mark Tompsett
2013-12-20 20:58:23 UTC
Created attachment 23738 [details] [review] Bug 11432 - 404.pl redirect for single, hidden result makes no sense. In bug 10584, when searching for something in OPAC and a single, hidden result is returned, the default automatic redirect to the details/MARCdetails/ISBDdetails page triggers a 404.pl error page. This makes no sense. The correct behaviour would be to give no results. TEST PLAN --------- 1) OPAC Search for something (I started with stupid) 2) Narrow it to one item (I tweaked it to stupid things) 3) Detail page comes up 4) Staff client -> home -> administration -> global system preferences -> OPAC 5) OpacHiddenItems add "homebranch: [MAL,DAV,PAP]", changing MAL, DAV, PAP to the branches for items for this single biblio. 6) Search for the one item again in OPAC -- 404.pl is triggered. 4) Apply patch 5) Search again for the one item search -- No results is triggered (as expected) Patch tested with a sandbox, by Christopher Brannon <cbrannon@cdalibrary.org> Created attachment 23879 [details] [review] Bug 11432 - 404.pl redirect for single, hidden result makes no sense. In bug 10584, when searching for something in OPAC and a single, hidden result is returned, the default automatic redirect to the details/MARCdetails/ISBDdetails page triggers a 404.pl error page. This makes no sense. The correct behaviour would be to give no results. TEST PLAN --------- 1) OPAC Search for something (I started with stupid) 2) Narrow it to one item (I tweaked it to stupid things) 3) Detail page comes up 4) Staff client -> home -> administration -> global system preferences -> OPAC 5) OpacHiddenItems add "homebranch: [MAL,DAV,PAP]", changing MAL, DAV, PAP to the branches for items for this single biblio. 6) Search for the one item again in OPAC -- 404.pl is triggered. 4) Apply patch 5) Search again for the one item search -- No results is triggered (as expected) Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Patch works according to test plan. Christopher Created attachment 24101 [details] [review] Bug 11432 - 404.pl redirect for single, hidden result makes no sense. In bug 10584, when searching for something in OPAC and a single, hidden result is returned, the default automatic redirect to the details/MARCdetails/ISBDdetails page triggers a 404.pl error page. This makes no sense. The correct behaviour would be to give no results. TEST PLAN --------- 1) OPAC Search for something (I started with stupid) 2) Narrow it to one item (I tweaked it to stupid things) 3) Detail page comes up 4) Staff client -> home -> administration -> global system preferences -> OPAC 5) OpacHiddenItems add "homebranch: [MAL,DAV,PAP]", changing MAL, DAV, PAP to the branches for items for this single biblio. 6) Search for the one item again in OPAC -- 404.pl is triggered. 4) Apply patch 5) Search again for the one item search -- No results is triggered (as expected) Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Created attachment 24102 [details] [review] Bug 11432: Show facets only if there is result to display If all results are hidden, the facets are displayed. With this patch, the facets are hidden too. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> I added a followup in order to hide the facets block if no result is displayed. Marked as Passed QA. I'm failing this because it doesn't address the root cause, which is that opac-search.pl is failing to count hits correctly when bibs get filtered out because all of their items are hidden. To see what I mean, try the following test: [1] Arrange a search that returns two hits. [2] Edit the items on one of the bibs so that all of them would be hidden. [3] Run the search. The OPAC will report two hits, but display a result list containing only one hit. It should actually be redirecting to that bib. The root issue is described in bug 8462. Putting aside the notion of further work to materialize the hidden status of the items attached to a bib so that the search engine can filter them out automatically, I think there's room for a patch for that bug that simply arranges so that $total and $hits are calculated correctly; I think that it is a far less productive direction to pile on more code that attempts to work around $total being incorrect. Jonathan: regarding your follow-up, one thing to note is that the Bootstrap theme already Galen, is 11489 the type of patch you were talking about on the IRC channel? If so, perhaps Jonathan Druart's patch combined with 11489 would be the proper solution? Created attachment 24293 [details] [review] [SIGNED OFF] Bug 11432: Show facets only if there is result to display If all results are hidden, the facets are displayed. With this patch, the facets are hidden too. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> |