Autocomplete caches previous results even when dependent filters change

Created on 13 November 2014, over 10 years ago
Updated 23 April 2025, 9 days ago

If you enable the "Suggestions depend on other filter fields" option, then the other exposed filters will be taken into account when returning results for the autocomplete.

However, the Drupal autocomplete functionality will cache results that were previously returned, even if they are no longer valid for the current values of the other exposed filters.

So, for example:

  1. If we have two exposed filters: Title and Content Type
  2. Title has both "Use Autocomplete" and "Suggestions depend on other filter fields" enabled
  3. We have two peices of content on the site: one Article called "Here is an article" and one Basic page called "Here is a basic page"
  4. Now, on the View, if we set "Content type" to "Article" and type "Here" into the title - it'll return "Here is an article" in the autocomplete.
  5. But if we change the "Content type" to "Basic page" and type "Here" (with out reloading the page in between) it'll still show "Here is an article" because the results are cached!
  6. If we type more, for example, "Here is" then it'll show us "Here is a basic page"

In order for this functionality to work correctly, it needs to clear the autocomplete cache before submitting a request which has different dependent filter values than the last time the request was submitted.

πŸ› Bug report
Status

Closed: outdated

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dsnopek USA

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.

  • πŸ‡·πŸ‡΄Romania vasike Ramnicu Valcea

    As Drupal 7.x and also modules 7.x versions "ended their lives", closing the 7.x issues.

    And thanks for participating and using the module.

    p.s. if this still an issue on the latest 2.x version, please feel free to re-open and update the version accordingly.

Production build 0.71.5 2024