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.
*** Bug 19688 has been marked as a duplicate of this bug. ***
Linked to Bug 18989
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
Created attachment 148292 [details] Sample MARC records (MARC21) Sample MARC records (MARC21) with items