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

Created on 13 August 2011, about 13 years ago
Updated 25 August 2023, about 1 year ago

Problem/Motivation

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.

Steps to reproduce

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.

Proposed resolution

Remaining tasks

Manual testing to confirm if this is still an issue.

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 12 hours ago

Created by

πŸ‡·πŸ‡ΊRussia crea

Live updates comments and jobs are added and updated live.
  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

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.71.5 2024