I have several events defined in a CCK type. The events appear in the Month view, but if I switch to week view they do not appear. They also do not appear when clicking on the relevant week number in the left column of the month view.

View export:

  $view = new stdClass();
  $view->name = 'calendar';
  $view->description = 'Calendar view of any date field';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'Calendar';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'calendar';
  $view->url = 'calendar';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '99';
  $view->block = TRUE;
  $view->block_title = '';
  $view->block_header = '';
  $view->block_header_format = '1';
  $view->block_footer = '';
  $view->block_footer_format = '1';
  $view->block_empty = '';
  $view->block_empty_format = '1';
  $view->block_type = 'calendar';
  $view->nodes_per_block = '99';
  $view->block_more = TRUE;
  $view->block_use_page_header = FALSE;
  $view->block_use_page_footer = FALSE;
  $view->block_use_page_empty = FALSE;
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'changed',
      'sortorder' => 'ASC',
      'options' => 'normal',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'calendar_year',
      'argdefault' => '2',
      'title' => 'Year',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
    array (
      'type' => 'calendar_month',
      'argdefault' => '2',
      'title' => 'Month',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
    array (
      'type' => 'calendar_day',
      'argdefault' => '2',
      'title' => 'Day',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
    array (
      'tablename' => 'event',
      'field' => 'event_start',
      'label' => '',
      'handler' => 'views_handler_field_date_small',
    ),
    array (
      'tablename' => 'event',
      'field' => 'event_end',
      'label' => '',
      'handler' => 'views_handler_field_date_small',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'term_node_3',
      'field' => 'tid',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '4',
  1 => '5',
  2 => '6',
),
    ),
    array (
      'tablename' => 'term_node_2',
      'field' => 'tid',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '1',
  1 => '2',
  2 => '3',
),
    ),
  );
  $view->exposed_filter = array (
    array (
      'tablename' => 'term_node_3',
      'field' => 'tid',
      'label' => '',
      'optional' => '0',
      'is_default' => '0',
      'operator' => '0',
      'single' => '0',
    ),
    array (
      'tablename' => 'term_node_2',
      'field' => 'tid',
      'label' => '',
      'optional' => '0',
      'is_default' => '0',
      'operator' => '0',
      'single' => '0',
    ),
  );
  $view->requires = array(node, event, term_node_3, term_node_2);
  $views[$view->name] = $view;

Comments

gmak’s picture

I have found that with the latest version of HEAD, by setting the starting day of the week to Sunday, you can see the events in the week view. However, the 'week' view link still points to the wrong week (actual week - 1).

coolin’s picture

I have the same problem ... (and basically the same view as the one you showed).
Could you explain how you change the starting day of the week to Sunday...

I remarked that you have not specified the WEEK argument. Neither do I. However, If i try to set it i get problem and I can no more see event in the day field (when i click on a day, I have a view of a month without events).

gmak’s picture

You change the starting day of the week in the standard Drupal settings....

Administer > Site Configuration > Date and Time

KarenS did suggest, in a previous post, that you not set the week argument. I'm not sure why this is.

Lowell’s picture

I think the reason for not setting the week argument is because the arguments filter by year, month, and day. Weeks just don't fit into that scheme. For example does 2007 02 20 mean something to you? What if I changed it to 2007 02 08 20. A little confusing now... Just a hunch!!!

KarenS’s picture

It is correct that you do not need to specify a week argument. The module adds it in automatically where needed.

Please get the very latest code for both the Calendar and Date module (you now need the Date API to be enabled for the calendar module, but there is still no dependency on CCK for this to work). Most of these things are timezone issues where a date gets adjusted back or forward so it doesn't fall in the right period and there have been a number of fixes to timezone problems in both modules.

Please report back whether the problem persists with the latest code.

Lowell’s picture

The first of the month item is showing in month view now, but in week view the Monday items are not showing. Not extensively tested.

Lowell’s picture

Does anybody else still have the week view missing Sunday and Monday items?

I have installed the latest CVS modules for Date and Calendar. This has fixed the 1st of the month missing content.

But the 1st (and sometimes the second) day of the week are missing their content.
If I set the week starting on Snday, the both Sunday and Monday are empty in the week view
If I set the week starting on Monday, then only Monday is left empty in the week view.

Have not tested other week starting days.

KarenS’s picture

Status: Active » Fixed

Hopefully fixed with commit I am just getting ready to make.

Lowell’s picture

Thank you so much for your effort and persistance. As far as I can tell this IS FIXED!!!

Thanks again

Anonymous’s picture

Status: Fixed » Closed (fixed)