I have following problem with date and week calendar views (using the dev releases of date and calendar from 2009-Feb-18 and views 6.x-2.3):

When I st time grouping in a date view to "Hour" I see all date nodes of a day (see attached screenshot "day_view_with_hour_grouping.jpg"). But when I set time grouping to "None", I see not all date nodes any more (see attached screenshot "day_view_without_grouping.jpg"). The same happens in week views.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NickSI’s picture

The bug seems to be in theme.inc

    // If we're not grouping by time, move all items into the 'all day' array.
    if (empty($view->date_info->style_groupby_times)) {
      foreach ($row['data']['items'] as $item) {
        $row['data']['all_day'] += $item;
      }
      $row['data']['items'] = array();
    }

$item variable in foreach statement is an array or node (all events for an hour), not just node. So it is nessesary to add an extra foreach loop as in code below.

    // If we're not grouping by time, move all items into the 'all day' array.
    if (empty($view->date_info->style_groupby_times)) {
      foreach ($row['data']['items'] as $hour) {
        foreach ($hour as $item) {
          $row['data']['all_day'][] = $item;
        }
      }
      $row['data']['items'] = array();
    }
brahms’s picture

Tank you Nikolai, this solves the problem. The same fix is needed for the week display. I attach a patch file for release 6.x-2.x-dev from 2009-Feb-18. (The patch file has to be applied form the parent directory of the calendar module folder.)

brahms’s picture

Ups, the attach button did not work, I hope this time the file gets uploaded.

brahms’s picture

And a last try for the attachment...

solide-echt’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

The D6 branch is no longer supported so we're closing this issue. If you think this issue still exists in D7 you can open a new one.