Hello,
First off, versions: drupal 6.12, dev version of date released on 10-Jun-2009 and latest version of views - 6.x-2.6

Also, I'm not sure if this goes under Views or Date.

I'm trying to get a view working just right that groups events by their date. Events can repeat. So, I make a view that displays 20-50 events at a time, and has a pager. Well, when I make an event that repeats a lot, which many of the events in our system do, the pager does not show up or does not show up correctly. Events that are in the future of the last displayed date are not accessible from the view. It appears, to me, that the view is not counting the repeat dates as an item in its view.

Simple example: clear all events first. make an event that repeats every day for more days then the number of items that display in a page of the view. Now make an event that shows up at a date after the first page of the view. The second event is not accessible via the view

Here's my view:

$view = new view;
$view->name = 'Events';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'title' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'field_event_date_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'short',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => 0,
    ),
    'repeat' => array(
      'show_repeat_rule' => 'hide',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_event_date_value',
    'table' => 'node_data_field_event_date',
    'field' => 'field_event_date_value',
    'relationship' => 'none',
  ),
  'tid' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'type' => 'separator',
    'separator' => ', ',
    'empty' => '',
    'link_to_taxonomy' => 0,
    'limit' => 0,
    'vids' => array(
      '2' => 0,
      '1' => 0,
      '4' => 0,
      '3' => 0,
    ),
    'exclude' => 0,
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'relationship' => 'none',
  ),
  'field_event_date_value_1' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'medium',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => 0,
    ),
    'repeat' => array(
      'show_repeat_rule' => 'hide',
    ),
    'fromto' => array(
      'fromto' => 'value',
    ),
    'exclude' => 1,
    'id' => 'field_event_date_value_1',
    'table' => 'node_data_field_event_date',
    'field' => 'field_event_date_value',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'field_event_date_value' => array(
    'order' => 'ASC',
    'delta' => '-1',
    'id' => 'field_event_date_value',
    'table' => 'node_data_field_event_date',
    'field' => 'field_event_date_value',
    'relationship' => 'none',
  ),
  'field_event_date_value2' => array(
    'order' => 'ASC',
    'delta' => '-1',
    'id' => 'field_event_date_value2',
    'table' => 'node_data_field_event_date',
    'field' => 'field_event_date_value2',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'term_node_tid_depth' => array(
    'default_action' => 'ignore',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => '',
    'title' => 'What\'s On %1',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'taxonomy_term',
    'validate_fail' => 'not found',
    'depth' => '10',
    'break_phrase' => 0,
    'set_breadcrumb' => 1,
    'id' => 'term_node_tid_depth',
    'table' => 'node',
    'field' => 'term_node_tid_depth',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '4' => 0,
      '3' => 0,
      '5' => 0,
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'article' => 0,
      'business' => 0,
      'event' => 0,
      'page' => 0,
      'story' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 1,
      '2' => 0,
      '4' => 0,
      '3' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_php' => '',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'event' => 'event',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'status_extra' => array(
    'operator' => '=',
    'value' => '',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status_extra',
    'table' => 'node',
    'field' => 'status_extra',
    'relationship' => 'none',
  ),
  'date_filter' => array(
    'operator' => '>',
    'value' => array(
      'min' => NULL,
      'max' => NULL,
      'value' => NULL,
      'default_date' => 'now',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'date_fields' => array(
      'node_data_field_event_date.field_event_date_value2' => 'node_data_field_event_date.field_event_date_value2',
    ),
    'date_method' => 'OR',
    'granularity' => 'minute',
    'form_type' => 'date_select',
    'default_date' => 'now',
    'default_to_date' => '',
    'year_range' => '-3:+3',
    'id' => 'date_filter',
    'table' => 'node',
    'field' => 'date_filter',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'What\'s on');
$handler->override_option('header', '<a href="/node/add/event">Add an event</a>');
$handler->override_option('header_format', '1');
$handler->override_option('header_empty', 0);
$handler->override_option('footer', '<a href="/node/add/event">Add an event</a>');
$handler->override_option('footer_format', '1');
$handler->override_option('footer_empty', 0);
$handler->override_option('empty', 'This location does not have any events.  Why not add one <a href="/node/add/event">here</a>!');
$handler->override_option('empty_format', '2');
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 20);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => 'field_event_date_value_1',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'title' => 'title',
    'field_event_date_value' => 'field_event_date_value',
    'tid' => 'tid',
    'field_event_date_value_1' => 'field_event_date_value_1',
  ),
  'info' => array(
    'title' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'field_event_date_value' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'tid' => array(
      'separator' => '',
    ),
    'field_event_date_value_1' => array(
      'sortable' => 0,
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'events');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));
$handler = $view->new_display('feed', 'Feed', 'feed_1');
$handler->override_option('style_plugin', 'rss');
$handler->override_option('style_options', array(
  'mission_description' => FALSE,
  'description' => '',
));
$handler->override_option('row_plugin', 'node_rss');
$handler->override_option('row_options', array(
  'relationship' => 'none',
  'item_length' => 'default',
));
$handler->override_option('path', 'events/%/feed');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));
$handler->override_option('displays', array(
  'page_1' => 'page_1',
  'block_1' => 'block_1',
  'default' => 0,
));
$handler->override_option('sitename_title', FALSE);
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('fields', array(
  'title' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 1,
      'max_length' => '40',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
  'field_event_date_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'short',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => 0,
    ),
    'repeat' => array(
      'show_repeat_rule' => 'hide',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_event_date_value',
    'table' => 'node_data_field_event_date',
    'field' => 'field_event_date_value',
    'relationship' => 'none',
  ),
  'tid' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'type' => 'separator',
    'separator' => ', ',
    'empty' => '',
    'link_to_taxonomy' => 0,
    'limit' => 0,
    'vids' => array(
      '2' => 0,
      '1' => 0,
      '4' => 0,
      '3' => 0,
    ),
    'exclude' => 0,
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'term_node_tid_depth' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => '',
    'title' => 'What\'s On Today %1',
    'default_argument_type' => 'php',
    'default_argument' => '',
    'validate_type' => 'taxonomy_term',
    'validate_fail' => 'not found',
    'depth' => '10',
    'break_phrase' => 0,
    'set_breadcrumb' => 0,
    'id' => 'term_node_tid_depth',
    'table' => 'node',
    'field' => 'term_node_tid_depth',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '4' => 0,
      '3' => 0,
      '5' => 0,
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => 'if(arg(1)){
return arg(1);
}
return "all";',
    'validate_argument_node_type' => array(
      'article' => 0,
      'business' => 0,
      'event' => 0,
      'page' => 0,
      'story' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 1,
      '2' => 0,
      '4' => 0,
      '3' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_php' => '',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'event' => 'event',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'status_extra' => array(
    'operator' => '=',
    'value' => '',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status_extra',
    'table' => 'node',
    'field' => 'status_extra',
    'relationship' => 'none',
  ),
  'date_filter' => array(
    'operator' => 'between',
    'value' => array(
      'value' => NULL,
      'min' => NULL,
      'max' => NULL,
      'default_date' => 'now',
      'default_to_date' => 'now +1 day',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'date_fields' => array(
      'node_data_field_event_date.field_event_date_value' => 'node_data_field_event_date.field_event_date_value',
      'node_data_field_event_date.field_event_date_value2' => 'node_data_field_event_date.field_event_date_value2',
    ),
    'date_method' => 'OR',
    'granularity' => 'minute',
    'form_type' => 'date_select',
    'default_date' => 'now',
    'default_to_date' => 'now +1 day',
    'year_range' => '-3:+3',
    'id' => 'date_filter',
    'table' => 'node',
    'field' => 'date_filter',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
));
$handler->override_option('title', 'What\'s On Today');
$handler->override_option('header', '');
$handler->override_option('footer', '<a href="/node/add/event">Add an event</a><br>
<?php
echo l("View more/future events", "events/" . arg(1)); 

');
$handler->override_option('footer_format', '3');
$handler->override_option('footer_empty', 1);
$handler->override_option('empty', 'This location has no events listed for today.');
$handler->override_option('items_per_page', 5);
$handler->override_option('use_pager', '0');
$handler->override_option('use_more', 0);
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'title' => 'title',
'field_event_date_value' => 'title',
'tid' => 'title',
),
'info' => array(
'title' => array(
'sortable' => 0,
'separator' => ' - ',
),
'field_event_date_value' => array(
'sortable' => 0,
'separator' => '',
),
'tid' => array(
'separator' => '',
),
),
'default' => '-1',
));
$handler->override_option('row_options', array(
'inline' => array(
'title' => 'title',
'tid' => 'tid',
),
'separator' => '-',
));
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
?>

Thanks!

Comments

jacerider’s picture

I have run in to this issue as well. Repeat dates don't count when a few is determining how pages to display.

gpk’s picture

Me too! (I'm actually using 6.x-2.3.)

The upshot of this issue is that not only do you not get the final pages of nodes (events in my case) -- i.e. all the repeats -- stretching off to the sunset, but also I am finding that the pager runs out before all my ordinary, non-repeating events have been listed.

On the other hand the results for page n of the View *do* seem to show the correct events and event repeats, allowing for all the repeats on this and previous pages (that's clever :-D). Just not enough pages..!

So event repeats kind of displace non-repeated ones off the end of the View, which means that our future events listing is missing important stuff!!

gpk’s picture

Not clear to me whether this is a Views issue, a Date issue, or a user issue (as in, maybe the View needs configuring slightly differently to make it work as desired).

Had a little poke around in the Date Repeat API code, in particular in modules/date/date/date_repeat.inc. The comments there explain how Date Repeat actually creates multiple Date values for the node (during node form validation, as it happens. Neat!).

I took the query reported by the Views preview widget and ran it manually on the DB. This returned 36 results - which is all the existing events and their repeats :-). However when counting how many results there are Views must be thinking in terms of distinct nodes (of which there are 13 - which fis on 2 pages of 10 -- this is all I see in the View). This despite the Distinct option for the view (Basic settings) clearly being set to "No" (if set to "Yes" I get a spectacular PHP error - because of an error in query syntax).

cwhitcoe’s picture

I am having the same issue. I hope someone finds a fix / patch

gpk’s picture

Status: Active » Closed (won't fix)

It appears the correct fix for this is D7's DB-TNG, so this is unfortunately a clear won't fix for D6. See #552804: Records are missing when using pager and items per page.