Facets AJAX not working with Views pager

Created on 27 October 2021, over 2 years ago
Updated 10 August 2023, 11 months ago

Steps to Reproduce

  1. Create a search api based view with a pager.
  2. Set items to display per page to something small, for testing say 2.
  3. Add a filter to the view, for example content type.
  4. Add a facet to the view for the filter created in step 3.
  5. Go to your search view and search for a result that will give you multiple pages of results.
  6. In the pager, select the last page
  7. Select a facet to narrow the list of search results down to something small, ensuring that the resulting number of items will not be able reach to the page selected in the previous step.
  8. No results are displayed.

Notes

Seems like AJAX is not correctly refreshing the view upon facet selection. When using a facet on the first page of search results, there is no issue. Issue only presents itself when users activate a facet on a page beyond page 1 and there aren't enough items per page in that filter to reach the page they activate it from. On a page that shows no results, copy pasting the url and loading a page shows the results, debugging also indicates that there is no page # being set in AJAX. Also, the # of results is being correctly shown, so search/facets is recognizing that there are results, it is just not displaying them.

Have already tried the patches on https://www.drupal.org/project/facets/issues/3075378 🌱 [META] Overview of Facets + Ajax issues Active including https://www.drupal.org/files/issues/2021-08-25/facets-facets_with_ajax_n... β†’ .

πŸ› Bug report
Status

RTBC

Version

1.8

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024