I'm setting up a commerce site based upon commerce kickstart which using views, search_api and facet_api for it's search.

I've configured the search facets so that multiple taxonomy terms in a single facet can be selected and all seems to work well.

If I manually manipulate the url and change the term id to a non existent id or just enter a random word it is added to the list of options for that facet which are then displayed.

Is this correct behaviour?

If so can someone suggest the best way to hook into the code and check and remove invalid terms.

As an example if the url was something like

www.example.co.uk/products/search?f[0]=field_engine%3A60&f[1]=field_engi...

it will perform the search for the term ids 60 and 61 and the facet looks like the first image.

If the url is changed to

www.example.co.uk/products/search?f[0]=field_engine%3A60&f[1]=field_engi...

then the category 'Test-engine' appears in the list when it doesn't actually exist on the system.

While I have a reasonable understanding of what the view, search api and facet api are doing this is my first real use of this combination so if I'm missing something obvious then please let me know.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ollie222 created an issue. See original summary.

Ollie222’s picture