When the default search has custom filters enabled and a facet block is displayed on a non-search path the facet block doesn't take into consideration the filters.
For instance, I display a "Quick Search" bar on the home page of a site that displays the main categories of items (using facets). I have a filter on my default search page that hides items that are no longer active (but can still be searched via other searches, but shouldn't be highlighted). The counts after the categories in the facet list include these inactive items as well, even though the default search page will never show them.

This can be fixed by passing the custom filters when running the "empty search."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jwalz’s picture

Status: Active » Needs review
FileSize
1.18 KB

This is the patch I'm currently using in my install. I don't think this breaks anything, but I don't have anywhere a deep enough understanding of all the inner workings of this module to say for sure.

pwolanin’s picture

looks reasonable. This would be worth a test case if possible.

Nick_vh’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

Going to commit this one and hopefully we can add a small sprint to add tons of tests to the suite later. This otherwise might get blocked. Does need backport though