Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296253

Double underscore in machine name breaks AJAX views

$
0
0

OK so I bumped into a real strange bug with Drupal views today. I was debugging a view which had the machine name deals__page (note the double underscore), which wasn't working with AJAX exposed filters.

Anyway, so turns out I can replicate that having a machine name with double underscores eg. page__1 breaks AJAX on a view when using exposed filters.

Steps to replicate on a clean Drupal 8.8.1 install:

1. Create a new view with a page display.
2. Add an exposed filter.
3. Ensure the "Use AJAX" setting is set to "Yes".
4. By default the machine name will be "page_1", leave it like this for now.

Load the page and confirm the exposed filter works correctly and uses AJAX to update the exposed filter results.

Now change the machine name to "page__1" with a double underscore, clear caches and reload the form. For some reason AJAX is now disabled on the form when using the exposed filters.

Clearly there is a very easy workaround in the meantime, just don't use a machine name with double underscores. But this should still work with any valid machine name in my opinion.


Viewing all articles
Browse latest Browse all 296253

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>