I'm having trouble getting the date filter to work for selecting items.

The view & content type being used were both imported from another site, where they worked (and are currently working). That site is currently running Views 2.12. This site is on 2.14.

Here's a procedure that (for me, on this site) will demonstrate the issue:

  1. Create sample nodes with event start and end dates
  2. Create view
  3. Add filter for event content type
  4. verify that it's selecting events
  5. Add filter for event start date (operator = 'greater than or equal to'*; absolute date; form type = 'select'; granularity = 'day'; Date field = from date**; method = 'or'***)
  6. fails to select any events
  7. Un-set absolute date [or delete relative date code]
  8. all events are selected

*Have also tried this with 'greater than', 'less than', and 'less than or equal to' with the same results. in all test cases, there were sample nodes that should have displayed.

**Have also tried this with both 'from' and 'to' dates.

***Have also tried 'and'.

Comments

escoles’s picture

Title: Date filter not functioning to select items » Date filter behavior unpredictable [was: Date filter not functioning to select items]

Problem appears to go away after minor changes to the Date field in the content type:

  1. Changed default for Date from field to 'now'
  2. Set date format to 'January 15, 2011 - 13:20 +0000'

[modeling 'solution' here: http://drupal.org/node/426990#comment-3950524]

HOWEVER: Problem REMAINS resolved, after I roll back those changes.

I.e., problem went away, but the only actions taken were ones that when rolled back, did not cause the problem to re-emerge.

So, there's still a problem that I need to solve: Views display behavior is unpredictable.

[edited to correct spelling error, incomplete item 2]

What could cause this type of behavior?

escoles’s picture

The Drupal caches were cleared multiple times during this debugging process. However, I never explicitly cleared the Views cache. Could corruption of the Views cache have been the cause of the problem, & implicitly forcing it to be cleared its resolution?

drm’s picture

So I had a problem when a View when upgrading from 2.12 to 2.14 - started getting an error regarding accessing a cck date field that it never had problems with before.

Ended up that I needed to add the date field to the display fields (display excluded). Without this, the join for that cck table was not getting added to the query. So it appears that between 2.12 and 2.14, requirements that argument (and possibly filter?) fields be also in the field list has gotten tighter?

I've still got some other arguments in this View that are not in the field list and they are getting accessed, but they are not dates. I also upgraded the date module, so maybe this is an issue with date's upgrade (2.6 to 2.7).

See http://drupal.org/node/1034292 for the bug report in Date. And http://drupal.org/node/580178.

escoles’s picture

Thanks. If that requirement exists, it seems to be a fuzzy requirement. However, in view of your suggestion, I'll make sure that all filtered fields are in the view from now on.

kars-t’s picture

Status: Active » Fixed

Hi

I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.

Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.

Status: Fixed » Closed (fixed)

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