Closed (fixed)
Project:
Facets
Version:
3.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2026 at 12:02 UTC
Updated:
17 Sep 2026 at 21:10 UTC
Jump to comment: Most recent
3.0.4 introduced an error for facets_exposed_filters in #3589162: Support special hierarchy processors as exposed filters
When you have an active search filter, which causes a facet to have no results
Error is "Call to a member function getSearchApiQuery()" for that specific facet.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
strykaizerComment #4
jonsimonsen commentedRemoved comment since it was referring to a different issue
Comment #6
ramil g commentedI ran the proposed fix through an AI-assisted code review and tested the resulting changes on a Drupal 10 site. The original guard prevents the fatal error, but the review suggested moving it before facet initialization, checking explicitly for a NULL query, and limiting it to facets that have not already been processed.
I updated the MR accordingly and added a unit test covering an exposed-filter block without a Views query. I also manually verified that selecting a site-wide facet now filters the results without triggering the getSearchApiQuery() error.
Comment #7
joelpittetWe had 2 people confirm seeing this and with the MR resolve this issue.
The PHPUnit failures are fixed in #3618817: REST tests fail: config entities need ConfigEntityResourceTestBase, and the XML charset changed and #3618692: Term weight and UID processors are not offered on Drupal 11.4
Comment #8
dready2011 commentedI had the same problem and the patch fixed it for me.
Comment #9
joelpittetThanks for testing it @dready2011 and for the initial fix @strykaizer and iteration @ramil g!
I ran the tests only which do indeed show it tests the right thing, and seen it fix my problem directly too. The merge train has left the station!
Comment #12
camhowardI ran into this issue after updating to Drupal 11.4.6 and Facets 3.0.6. After the update, the blocks in the header and footer regions, the search field, all site menus, and the tabs for editing nodes were missing from the front end of the site. The error message displayed at the bottom of the page.
I was glad to find this issue and manually applied the changes in the MR !395 diff. The site then returned to normal with all blocks and navigation restored. Search and facets are now working normally again.
Thank you!
Comment #13
joelpittetI am torn on making another release until we sort out #3618467: Facets 3.0.4 introduces BC break in WidgetPluginBase constructor but glad this helped you too @camhoward.