I'm trying to create what I thought was a fairly straight-forward block using Views (ver. 2.5).

I have created a content type I call event. It basically has a title, date (CCK field) and description of the event.

I wanted a block to display the 4 next events from the current date.

The filters I applied are below:
Filters:
Node: Type = Event
Node: Published Yes
Date: Date Content: Date (field_date) - To date >= now

Query
SELECT node.nid AS nid, node.title AS node_title, node_data_field_date.field_date_value AS node_data_field_date_field_date_value, node_data_field_date.field_date_value2 AS node_data_field_date_field_date_value2, node.type AS node_type, node.vid AS node_vid FROM node node LEFT JOIN comments comments ON node.nid = comments.nid LEFT JOIN content_field_date node_data_field_date ON node.vid = node_data_field_date.vid WHERE (node.type in ('event')) AND (node.status <> 0) ORDER BY node_data_field_date_field_date_value ASC

My problem is that the date filter seems to be getting ignored. I'm not sure what I'm doing wrong (I'm still fairly new to Drupal).

I can get the filter to work if I "expose" the filter but I don't want users to be able to change it.

Any suggestions as to where I may be going wrong would be GREATLY appreciated.

Thanks.

Comments

johnnymugs’s picture

I'm having this same problem, only when I created the view a few months ago it DID work. Looking at it today, no dice.

edit: http://drupal.org/node/426990 <-- this seems to have some solutions, but i haven't tried any of them yet...

jordanduda’s picture

http://drupal.org/node/426990

Yes it addresses the same issue, and if you install the latest dev of the date module it solves the issue.
It worked for me, I'd recommend you give it a try.