Any Date filter that I add to a view is ignored. The view still shows all nodes, irrespective of whether they match the criteria specified by the Date filter.
Please let me know what relevant information I could provide to allow you to reproduce this bug.
Comments
Comment #1
gustav commentedAm I the only one experiencing this bug?
Comment #2
cirotix commentedNo, I am also getting this bug.
Furthermore this is not possible to set 'now' in the filter value field (I have only check it for Date: date - Date (field_date))
The are 2 problems :
- the javascript calendar is preventing you to enter anything but figures and hypens
- when javascript is disable you can enter 'now' in the value field but it doesn't validate.
Comment #3
Anonymous (not verified) commentedI have this problem. I can't even set the filter to 'now' in the database, though that might be a deliberate result of Drupal/Views/CCK architecture. The filter value just gets wiped out.
It might be related to this bug -- http://drupal.org/node/219003 -- which gustav also filed.
Comment #4
karens commentedThe filter should be working right in the latest commit.
Comment #5
jastraat commentedWorking with the release candidate - now getting the opposite problem with view filters. No events are displayed when the date filter option is set to 'now'. Only view empty text is displayed. Below is an export of the view:
Comment #6
jastraat commentedComment #7
Anonymous (not verified) commentedi can't speak about the specifics of your view, but i am sure that the filter bug has been fixed.
what's the query views is constructing? (install the devel module and click the "Dev queries" tab on your view... or go to your site's url views/events/queries) does it look reasonable if you substitute the arguments?
do you actually have any nodes that satisfy those filters?
i suspected that there is some funky business with timezone handling in my setup, because nodes would stop showing up in a similar upcoming events view of mine an hour before they happened. i went and checked out my timezone settings and re-saved them on the field, site and my user account. are your upcoming events more than 24 hours in the future?
Comment #8
jastraat commentedI'm using a datestamp, and the query is:
"SELECT node.nid, node_data_field_event_date.field_event_date_value AS node_data_field_event_date_field_event_date_value FROM {node} node LEFT JOIN {content_type_event} node_data_field_event_date ON node.vid = node_data_field_event_date.vid WHERE (node.status = '1') AND (node.type IN ('event')) AND ((node_data_field_event_date.field_event_date_value + INTERVAL (-21600) SECOND) >= ((NOW() - INTERVAL -18000 SECOND) + INTERVAL (-21600) SECOND)) ORDER BY node_data_field_event_date_field_event_date_value ASC"
I am quite sure that I have events more than 24 hours in the future.
"select n.nid, e.field_event_date_value from node n, content_type_event e where n.vid = e.vid and (n.status = '1') and n.type IN ('event') and FROM_UNIXTIME(e.field_event_date_value) >= NOW()" returns two events.
NOW() returns a datetime, and I'm not sure you can directly compare that with a UNIX_TIMESTAMP.
Comment #9
Anonymous (not verified) commentedIt looks normal to me, but I'm not the doctor. Are you setting up your timezones correctly? Your query seems to be adjusting it twice... once for the system timezone and another time for the field or user's timezone?
Regardless of the problem, this bug (date filter is ignored, all nodes returned) has been fixed. Your problem is that no nodes are returned. The filter is not being ignored. I think the correct procedure is to open a new issue.
Comment #10
sychosyd_28 commentedI still can't get the date filter to work correctly, even with the 5.x-2.0-rc release from March 11 or the 5.x-2.x-dev release from March 13.
I'm trying to create a filter that returns only articles from 2008, but all articles are coming up. I have the "Datestamp: Date Posted - Year" set to "is equal to" and the value set to "2008":