Closed (fixed)
Project:
Date
Version:
5.x-2.x-dev
Component:
Date CCK Field
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2008 at 08:27 UTC
Updated:
18 Dec 2008 at 11:31 UTC
I had a View with two filters on the CCK date field:
- date is less than now + 604800. The 604800 was in the option field.
- date is greater than now.
These combined to give me everything taking place in the coming 7 days.
Following upgrade, today's date and time is in the Value field for both filters, and 604800 is in the option field for the first.
The view seems to show me EVERYTHING.
Comments
Comment #1
karens commentedThe -rc version is out of date. If you want to report bugs, first see if things are fixed in the latest code, the -dev version. There have been lots of changes to the filters since the rc version and it should be working fine there.
Comment #2
joachim commentedI'm getting the same problem with today's -dev version.
Comment #3
joachim commentedIn fact, it's worse than with the RC release.
After I update the fields to the new format, I get no results.
It looks like this filter doesn't work properly:
- date is less than "now +1 week" in the option field
It's getting treated as simply "now".
Comment #4
jesss commentedI'm having this same issue in 5.x-2.x-dev. I'm trying to show board meetings from the last six months (>= now -6 months), but the MySQL query is selecting >= NOW().
Here's the export of my view.
And here's the views_build_view query as displayed by the Devel module.
I tried applying jjohnsonBLC's suggestion from #247752: Filtering views with date-field (comment #18), but that didn't work.
Comment #5
karens commentedThe placement for 'now' and '+1' are in different places in the 5.2 code than they were in the 5.1 code, so you'll have to manually fix your filters. I just committed a number of fixes to the Views filters, so try again with the latest -dev code.
Comment #6
jesss commentedThat worked. Thanks!
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
dkhorne commentedGidday,
I have just had the same problem except my filter was looking for a year in the CCK Date Field (e.g. Date: Date & Time - Year (field_date_time) is equal to 2008). It worked until I upgraded the dates module.
With a little searching I found teh culprit in date_views.inc at line 276
It did not like a value of "2008". What should it be to achieve the same results (e.g. return all nodes that have a 2008 date)?
cheers
David
Comment #9
karens commentedThis looks like a duplicate of #338936: Date filters in Views stop working after upgrade, with only slightly more information than the other reports there. You've identified the same line others have identified and I guess it's something to do with a year filter, so I'll dig into that, but the latest post is still a duplicate.