I have a view page that leverages Contextual Filters with query parameters. So when a user visits the view page, the URL is as such… /search?location=san+francisco. This works as expected.

Now there are 3 exposed filters for this same view. When the user selects an exposed filter, the above contextual query parameters are replaced with the exposed filter parameters, as such /search?weather=cloudy so the view output is incorrect.

Ideally, I want the URL to be /search?location=san+francisco&weather=cloudy.

How do I go about keeping the Contextual Filter query parameters on the Exposed Filter change? In other words, combining the two instead of the Exposed query replacing the Contextual query.

1 Answer 1


Found patches for both core and better exposed filters module that preserves the query parameter when exposed filter is initiated.

https://www.drupal.org/project/drupal/issues/2681953 https://www.drupal.org/project/better_exposed_filters/issues/3119947#comment-14289676

Apply the core patch first if using bef.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.