Hi there,
I am reopening this issue because I have been able to verify that infinite scroll with facets using ajax in the view still does not work, even with the patch in #8. 🐛 Facets doesn't work correctly with views infinite scroll Active
I have been testing the patch and debugging the code, after adding a key 'page' to the request with the page number, we are still removing the key 'page' from the query:$request->query->remove($key)
, this causes us to lose the results page that should be displayed from the query and does nothing after the ajax call is executed.
Here I leave the refactored patch that I have been able to verify is working with:
- Drupal 10.2.5
- facets "3.0.0-beta1"
- views_infinite_scroll "2.0.2"
- AJAX enable on the view
- Facets widget for the view configured to be "view exposed filters"
- Also I have this patches applied to facets "3360426 - Updated php 8.2 compatibility": "
https://www.drupal.org/files/issues/2024-02-19/3360426-php8.2_compatibil... →
"
"3394955 - Use native views for url generation when using exposed filter facets": " https://www.drupal.org/files/issues/2023-10-20/3394955-10.patch → "
Adapted patch for Drupal version 10.2.2