Updated date Exposed Node Filter has Funky argument name

jcfiala - August 26, 2008 - 16:25
Project:Views
Version:6.x-2.0-rc1
Component:exposed filters
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Sorry if that's not very clear.

I've set up a view with Table display, with the exposed Search Terms, Updated Date and Type filters, and an unexposed 'published' filter. When I want to set a filter in the URL, I set ?keys=space and it properly shows up as 'space' in the form. I set '?keys=space&type=article' and I get both the 'space' and 'article' in the form. But when I set the Updated date (which I changed the Filter Identifier to 'from') to 20080801, such as '?keys=space&from=20080801&type=article', then the space and article come through fine, but my Updated date filter field just shows '2'. I tried it with 'frog', and got just 'f'.

Digging into the code, I discovered that if I change that to '?keys=space&form[value]=20080801&type=article', then it works fine - the date field shows the 20080801 and the filtering works. I'm not sure if this is a bug in the code or if you intend to do this - it seems to be caused by the way you structure the from field's form elements, such that the #size and #type and #default value are in $form['from']['value'] instead of $form['from'].

I'm able to work as it is, but thought I'd bring it up as something odd. Maybe it's just a documentation thing.

#1

merlinofchaos - August 26, 2008 - 21:08

The reason it's set up this way is the 'between' filters where you'd have from['min'] and from['max'] and all of them are actually available.

That said, it would probably be a good idea to check and see if the operator is locked, and not using between to not use ['value'] at all. Let me see what I can do here.

#2

merlinofchaos - August 26, 2008 - 22:56
Status:active» fixed

I think I've smoothed this out somewhat, though this is a hairy bit of code that I find I often end up leaving little errors in after I've touched it due to the vast number of different use cases.

#3

Anonymous (not verified) - September 11, 2008 - 05:33
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.