Bug 23923 - OpacHiddenItems displays incorrect 'No results found' when all results on first page are hidden
Summary: OpacHiddenItems displays incorrect 'No results found' when all results on fi...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 19688 (view as bug list)
Depends on:
Blocks: 24403
  Show dependency treegraph
 
Reported: 2019-10-30 00:01 UTC by Nick Clemens
Modified: 2023-03-16 21:04 UTC (History)
5 users (show)

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


Attachments
Sample MARC records (MARC21) (31.10 KB, text/plain)
2023-03-16 21:04 UTC, Caroline Cyr La Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-10-30 00:01:29 UTC
To recreate you will need to hide a large portion of the catalog - essentially you need to perform a search where the first 20 or more records are hidden, you get a 'No results found' - then add offset=20 (or more) and see that the second page has results.
Comment 1 Katrin Fischer 2020-01-11 18:17:30 UTC
*** Bug 19688 has been marked as a duplicate of this bug. ***
Comment 2 Fridolin Somers 2020-09-04 11:51:28 UTC
Linked to Bug 18989
Comment 3 Caroline Cyr La Rose 2023-03-16 21:03:40 UTC
Still valid in current master (22.12.00.013).

I attempted to create a marc file to replicate the problem with the sample data that comes with Koha (sample libraries, sample locations, sample item types), in MARC21. It has 25 records with items. The items have
$a SPL
$b SPL
$c STAFF
$d 2023-03-16
$Y BK
except the last 3 items have no location ($c) and $d is 2023-03-11

1. Import the attached .mrc file, if needed reindex

2. In the OPAC, go to Advanced search, search for the following
   - Location and availability: Springfield
   - Sort by: Acquisition date: Newest to oldest

--> You should have (at least) 25 results

3. In the OpacHiddenItems system preference, add the following line

location: [STAFF]

4. In the OPAC, redo the search

--> No results

5. Redo the search with the opposite sort (Acquisition date: Oldest to newest)

--> 3 results
Comment 4 Caroline Cyr La Rose 2023-03-16 21:04:07 UTC
Created attachment 148292 [details]
Sample MARC records (MARC21)

Sample MARC records (MARC21) with items