The pager on a search index page doesn't work correctly when using search api (tag-based) caching and AJAX. It is always stuck at the first page that is cached of the pager.
Steps to reproduce:
1. Create Test search server - backend Database.
2. Create index, index data.
3. Create View Content: Indexed Data.
4. Enable: use AJAX
5. Enable caching and use Search api (tag-based)
5. Set full pager.
6. go to the page and use the pager.
Comments
Comment #2
drunken monkeyDoes the patch in #2665476-16: Views mini pager is not working maybe solve this for you?
Comment #3
dpolant commentedI am seeing this issue as well. Turning off caching or forcing a get_total_rows solves it.
FWIW I am using views_embed_view to render the view.
After digging into this, the problem seems to be that the postExecute for Mini pager doesn't run after a cache hit, so it doesn't get a chance to say what its total_items is. In theory though that shouldn't matter - if it was able to do so successfully once it should be able to cache it. Maybe that's where the disconnect is, not sure.
I think the next step should be someone double confirm this on a vanilla instance View page or view block. The original poster's conditions seem to be correct.
I am on Search API 8.x-1.8.
Thanks!
Comment #4
drunken monkeyNo, sorry. I followed the steps in the IS exactly, but couldn't reproduce it. AJAX-paging with tag-based caching works fine for me (both as an admin and anonymous).
Comment #5
dpolant commentedOk, I had a feeling it wouldn't be that obvious. We found a workaround so it's not critical for us to get to the bottom of it. Still possible it has to do with using views_embed_view, and if not that it must be a more obscure set of conditions.
Comment #6
drunken monkeyClosed due to long time without response.
Please re-open with the requested information if still relevant.
Comment #7
lukasss commentedI have this problem when I use the facets_pretty_paths module with my patch from https://www.drupal.org/project/facets_pretty_paths/issues/3317980 that add cache
but if I use native "Query string" processor then I dont see this problem.