Since http://drupal.org/cvs?commit=122729 user-supplied filter parameters seem to get ignored in favour of the default value. It seems to fail consistently on even the simplest views (see attached).

I don't fully understand the implications, but setting both $form_state[input] and $form[#post] seems to fix the problem.

I was surprised this hasn't been noticed so I hope this can be reproduced!

Simon

CommentFileSizeAuthor
views_filter_test_view.txt1.54 KBAnonymous (not verified)
views_filter_input_patch.txt642 bytesAnonymous (not verified)

Comments

willeaton’s picture

Something very similar... please tell me if not...
When I expose a price filter, I want all listings to be visible unless a user enters a price. I created an exposed filter (optional) which straight away reduced the list to 0 when using the "less than" (because nothing is less than 0). Even if I set a standard with a very high number the initial list is empty unless the user enters a value.

Whatever I do, it does not change "0" in the query...
(node_data_field_price.field_price_value < 0)

Thanks
Will

drewschmaltz’s picture

I am having a similar problem. The "between values" do not supply "added options to allow it not to be set". Perhaps I've been going about it wrong, but more than likely its tied into this bug report. Default values do nothing for the optional field as well. - it remains required.

EDIT: I should clarify when values are supplied by user, everything works as expected.

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

simonc, I haven't seen this problem, but your fix is definitely not the correct one even if it is. But I am unable to replicate this issue.

willeaton’s picture

Expose a filter of a cck decimal field for price. Make the exposed field "less than" and enter a default value. Whatever you put in for the default value is ignored in the query generated, it shows instead "< 0"

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Unable to replicate. No updates for more than 30 days.