Skip to content

Fix exposed filter having no effect when submitted. #2

Closed
wants to merge 4 commits into from

3 participants

@adamdicarlo

The value (search distance) was being unset, so when the exposed filter
was submitted, the URL query included circle[value]="" (blank), causing
the filter not even to generate a query condition, and thus have no
effect on the view's results.

adamdicarlo added some commits Sep 1, 2011
@adamdicarlo adamdicarlo Remove an unset that caused submitted exposed filter to fail.
The value (search distance) was being unset, so when the exposed filter
was submitted, the URL query included circle[value]="" (blank), causing
the filter not even to generate a query condition, and thus have no
effect on the view's results.
2ece1f8
@adamdicarlo adamdicarlo Revert "Remove an unset that caused submitted exposed filter to fail."
This reverts commit 2ece1f8.
This was not the right fix.
ca91319
@adamdicarlo adamdicarlo Fix exposed filter form. 59cdcd0
@adamdicarlo

OK, please have a look at my new commit. It's working great for me. After seeing the difference in the data structure (in secure_input()), I can only guess Views changed its format recently.

I'm not 100% sure the accept_exposed_input() is necessary, but the base class's wants to return FALSE if "value" is empty, but hey, we don't just have value, we have value AND location. So that should be checked, too.

@henrijs
henrijs commented Sep 8, 2011

Ahh, yes! This works. Fixes issues in http://drupal.org/node/1013450 @ #43 & #44. Well done, Starruner!

@jpstrikesback
Owner

See latest commit for fixes to both these issues (exposed filters & distance field)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.