I have a CCK date field, and a block view that filters on the From date between now and now +6 days. An export is attached.

With Date 6.x-2.x-dev-2009-03-20 (CHANGELOG.txt says v 1.1.8.392 2009/03/21 10:18:00), the filtering works correctly. The result is shown in the first screenshot.

With Date 6.x-2.1 and 6.x-2.x-dev-2009-03-26, the filtering has no effect. The block shows events from all dates, as the second screenshot shows.

I don't know where to find Content Copy, but if you'll point me to it I'll be glad to attach an export of my date field.

Thanks,
Andrew.

Comments

Andrew Schulman’s picture

StatusFileSize
new7.58 KB

OK, I found Content Copy. Attaching an export of my Event content type.

strauch’s picture

Thanks andrex to open a new issues, i have the same problem. the first dev version after the 2.0 release had the fix, now it is broken again.

Thanks

strauch

strndy’s picture

I've got same problem. When I expose this filter, it works correctly. After hiding, it's broken again :(

neilk’s picture

Exposing the filter when the view is a 'block' doesn't fix it for me, but exposing a 'page' view does.

strndy’s picture

Version: 6.x-2.1 » 6.x-2.x-dev
StatusFileSize
new24.23 KB

It looks, that last -dev solve this, you have to delete all filters and sort criteria and create new ones after update.

domesticat’s picture

I think I can provide a little more info. To step through the guide:

  1. I updated to the latest -dev versions of Date and Calendar this morning.
  2. Update.php ran successfully. No errors.
  3. I cleared the general cache and Views' cache.
  4. After clearing both caches, I attempted to build a new view (thus ensuring there was no possibility of old data corrupting the view in some way)

If I provide an absolute value, like "nodes of type event whose start date is greater than or equal to April 1, 2009" the view filters properly, and I can see the clause in the query:

AND (DATE_FORMAT(STR_TO_DATE(node_data_field_event_start.field_event_start_value, '%Y-%m-%dT%T'), '%Y-%m-%d') >= '2009-04-01')

If I change the filter to a relative value (now, etc.) I don't see a date-filtering clause appearing in the query at all. I'm guessing herein lies the error.

guignonv’s picture

Same issue for me.

domesticat’s picture

Some good news and some weird news.

While I was NOT seeing a "update to latest dev" flag in admin/reports/updates for the Date module, I did indeed download the module a few hours before Karen's fix populated to 6.x-dev.

Even if you think you are running the latest dev, take a moment to re-download the latest dev of Date. After I did, filtering worked properly again. Given that this thread was started on the same day that the dev was posted, I bet we all downloaded the tarball right before the fix populated to -dev.

Not marking as 'fixed' until someone else can confirm my finding, but it merits saying: Karen, mea culpa. Please continue to rock. :)

guignonv’s picture

True! I did not get the right 6.x-dev! Now it's fine for me too.

domesticat’s picture

Status: Active » Fixed

Marking as 'fixed.' Yay Karen!

strauch’s picture

i hope it will fixed in 2.2 too and that there will be not the same procedure as 2.0 to 2.1. So i will test the dev version. Again :-( on my production site.

Andrew Schulman’s picture

Confirmed, the problem is fixed in 6.x-2.x-dev-2009-03-27. Thanks, Andrew.

GatorBat’s picture

Confirmed, the problem was also fixed for me using the 6.x-2.x-dev-2009-03-27. Thanks a ton, Karen!

Status: Fixed » Closed (fixed)

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