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

"Remember" feature of exposed filters doesn't work with AJAX and is generally fragile

$
0
0

Remembered filter values are restored in view::get_exposed_input() function only when there is no input from GET parameters. However, AJAX view rendering always adds lots of parameters, so input is always not empty. Therefore exposed value fallbacks to the one in GET parameter, which doesn't work on initial page load, because remembered filter values are not present in GET until user makes a selection himself.

To reproduce:
1) Create a view with exposed filter and AJAX enabled. Make some filter selection so Views remembers it.
2) Reload the page. View should use remembered filter value.
3) Try to use AJAX pager. On page switch, the filter will reset, because of this bug.
4) If you manually select a value in the filter, all subsequent AJAX page switches will correctly work with the filter, because the filter value will be present in GET.


Viewing all articles
Browse latest Browse all 314718

Trending Articles



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