Issues with views with exposed filter and facets

Created on 3 September 2025, 18 days ago

I'm not sure if this is a bug or if I am using this module for a scenario it is not intended to support.

Problem/Motivation

I have a search index view configured called Search. It has 5 displays (search, faculty directory, news, publications, resources). The Search display has an exposed keyword search which we expose in the global header when someone clicks on the magnifying glass. All of the views have facets for various taxonomy vocabulary terms. Normally, this works OK, even if you are on one of the other search displays like /publications when you do a global search.

But with this module installed, Drupal gets confused. If I am on the /publications page and I filter for a topic or two, it works OK. But if while I'm on the /publications page with the filtered results, I use the global header search form to search for a term, Drupal appends the search parameters from the topic filter on the publications page onto the search query parameters (e.g., /search?keywords=bears&research_area=adhd) which does not compute (the search view doesn't have a research_area facet). This results in a memory error.

Perhaps this should be filed as a separate issue, but I also saw intermittent memory errors just staying on /publications and adding filters & selecting facets. I tried quite hard to reproduce these problems on the main branch (where I haven't installed this module yet), but it never seems to merge query strings in URLs or produce a memory error.

Steps to reproduce

1) Install the following:

  • Drupal 11.1.6
  • Facets 3.0.1
  • protect_views_flood_control 1.0.0-alpha1
  • Search_api 8.x-1.38
  • search_api_pantheon 8.3.1
  • search_api_solr 4.3.10
  • configurable_views_filter_block 1.0.0-beta1

2) Configure:

  1. Research Area taxonomy
  2. Category taxonomy
  3. Publication content type with a Research Area taxonomy term reference field (multivalue)
  4. Page content type with a Category taxonomy term reference field (multivalue)
  5. Solr search server
  6. Search index that indexes the above content types and their taxonomy reference fields
  7. A search index view with 2 displays: search and publications (the search view should have a keyword exposed filter)
  8. Facets for Page category and Publication research area terms
  9. A block with just the search view's keyword exposed filter (using the configurable_views_filter_block module)
  10. Using block layout, place the exposed keyword filter in the header region on every page of the site (i.e., no pae or content type restrictions)

3) Create content:

  • Category terms
  • Research Area terms
  • Page nodes with category terms
  • Publication nodes with research area terms

4) Go to Publications view on the front end. Select some research area facets (2 should be enough).
5) This should filter OK.
6) Without clearing the facets or navigating elsewhere, use the keyword search form in the global header to search for a term (e.g., "bears").
7) You will likely get a memory error here. If you look at the URL you will see /search?keywords=bears&research_area=yourterm - this won't work because there are is no facet for research area associated with the search view.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States banoodle San Francisco, CA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024