I'm using PHP5. I went through a normal upgrade to Date/Calendar 2.0, went though update.php with the new modules off, got the usual CCK related errors, turned the new modules on, went through again update.php fine, no errors. Went through update.php again having read Karen's note. But when I went to a page with "upcoming events" blocks (one for one-time events, one for repeating events) and a mini-calendar block, I got:
Fatal error: Cannot access empty property in /home/ageofi2/public_html/sites/all/modules/date/date/date_handler_field_multiple.inc on line 127
I disabled the Calendar module, same error. I started disabling Date components and it seems Date Popup is the problem. I get the white screen with the above PHP error if Date Popup is on. I turned back on calendar and the rest, but NOT Date Popup and my page loads, but the mini-calendar has no events on it, and my upcoming events block is showing the titles but not the dates of the events. I am using only date fields that use the popup calendar date entry widgets.
I've appended exports of my "Event, One-time" node type and my Event, Repeating" node type. After that is an export of my "events_ongoing_upcoming" view that creates the block with upcoming events listed.
Content type "Event, One-time" exported, showing field "field_datetime":
$content[type] = array (
'name' => 'Event, One-time',
'type' => 'event',
'description' => 'A <em>one-time event</em> posting is for announcing an upcoming event that will not repeat automatically. It will by default appear in the News and Events listing. You can enter a starting date and time and an ending date and time. You can also create events that happen on multiple, specific days. You should not enter ongoing endlessly repeating events using this content type -- use the Repeating Event type (Event, Repeating) instead.',
'title_label' => 'Title',
'body_label' => 'Body',
'min_word_count' => '0',
'help' => '',
'node_options' =>
array (
'status' => true,
'promote' => false,
'sticky' => false,
'revision' => false,
),
'upload' => '1',
'show_preview_changes' => 1,
'nodewords' => 1,
'notifications_node_ui' =>
array (
'links' => true,
'form' => false,
'comment' => false,
'block' => false,
),
'old_type' => 'event',
'orig_type' => '',
'module' => 'node',
'custom' => '1',
'modified' => '1',
'locked' => '0',
'comment' => '0',
'comment_default_mode' => '1',
'comment_default_order' => '1',
'comment_default_per_page' => '50',
'comment_controls' => '3',
'comment_anonymous' => 0,
'comment_subject_field' => '1',
'comment_preview' => '1',
'comment_form_location' => '0',
'flatcomments' => 1,
'print_display' => 1,
'print_display_comment' => 0,
'print_display_urllist' => 1,
'print_mail_display' => 1,
'print_mail_display_comment' => 0,
'print_mail_display_urllist' => 1,
);
$content[fields] = array (
0 =>
array (
'label' => 'Date and time',
'field_name' => 'field_datetime',
'type' => 'datetime',
'widget_type' => 'date_popup',
'change' => 'Change basic information',
'weight' => '1',
'default_value' => 'blank',
'default_value2' => 'same',
'default_value_code' => '',
'default_value_code2' => '',
'input_format' => 'm/d/Y - g:ia',
'input_format_custom' => '',
'year_range' => '-3:+3',
'increment' => '1',
'advanced' =>
array (
'label_position' => 'above',
'text_parts' =>
array (
'year' => 0,
'month' => 0,
'day' => 0,
'hour' => 0,
'minute' => 0,
'second' => 0,
),
),
'label_position' => 'above',
'text_parts' =>
array (
),
'description' => 'Enter the date and time of this event. Providing a starting date and time is required. Optionally, you can enter both a starting date and time, and an ending date and time. If the event happens on multiple, discontinuous days, you can obtain another date-time entry area by clicking the "Add another item" button below.',
'group' => false,
'required' => 1,
'multiple' => '1',
'repeat' => 0,
'todate' => 'optional',
'granularity' =>
array (
'year' => 'year',
'month' => 'month',
'day' => 'day',
'hour' => 'hour',
'minute' => 'minute',
),
'default_format' => 'field_datetime_default',
'tz_handling' => 'site',
'timezone_db' => 'UTC',
'op' => 'Save field settings',
'module' => 'date',
'widget_module' => 'date',
'columns' =>
array (
'value' =>
array (
'type' => 'datetime',
'not null' => false,
'sortable' => true,
'views' => true,
),
'value2' =>
array (
'type' => 'datetime',
'not null' => false,
'sortable' => true,
'views' => false,
),
),
'display_settings' =>
array (
'weight' => 0,
'parent' => '',
'label' =>
array (
'format' => 'above',
),
'teaser' =>
array (
'format' => 'field_datetime_default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'field_datetime_default',
'exclude' => 0,
),
0 =>
array (
'format' => 'above',
'exclude' => 0,
),
1 =>
array (
'format' => 'field_datetime_default',
'exclude' => 0,
),
2 =>
array (
'format' => 'field_datetime_default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'field_datetime_default',
'exclude' => 0,
),
),
),
);
$content[extra] = array (
'title' => '-5',
'body_field' => '-3',
'menu' => '4',
'taxonomy' => '-4',
'attachments' => '3',
);Content type "Event, Repeating" exported, showing field "field_datetime_repeating":
$content[type] = array (
'name' => 'Event, Repeating',
'type' => 'event_repeating',
'description' => 'A <em>repeating event</em> is like an ordinary <em>event</em>, but it automatically repeats on new days according to the parameters you set when you create it.',
'title_label' => 'Title',
'body_label' => 'Body',
'min_word_count' => '0',
'help' => '',
'node_options' =>
array (
'status' => true,
'promote' => false,
'sticky' => false,
'revision' => false,
),
'upload' => '1',
'show_preview_changes' => 1,
'nodewords' => 1,
'notifications_node_ui' =>
array (
'form' => false,
'comment' => false,
'links' => false,
'block' => false,
),
'old_type' => 'event_repeating',
'orig_type' => '',
'module' => 'node',
'custom' => '1',
'modified' => '1',
'locked' => '0',
'comment' => '0',
'comment_default_mode' => '4',
'comment_default_order' => '1',
'comment_default_per_page' => '50',
'comment_controls' => '3',
'comment_anonymous' => 0,
'comment_subject_field' => '1',
'comment_preview' => '1',
'comment_form_location' => '0',
'flatcomments' => 0,
'print_display' => 1,
'print_display_comment' => 0,
'print_display_urllist' => 1,
'print_mail_display' => 1,
'print_mail_display_comment' => 0,
'print_mail_display_urllist' => 1,
);
$content[fields] = array (
0 =>
array (
'label' => 'Date of first event in series, then repeats (See "Repeats" above)',
'field_name' => 'field_datetime_repeating',
'type' => 'datetime',
'widget_type' => 'date_popup_repeat',
'change' => 'Change basic information',
'weight' => '1',
'default_value' => 'blank',
'default_value2' => 'same',
'default_value_code' => '',
'default_value_code2' => '',
'input_format' => 'm/d/Y - g:i:sa',
'input_format_custom' => '',
'year_range' => '-2:+2',
'increment' => '1',
'advanced' =>
array (
'label_position' => 'above',
'text_parts' =>
array (
'year' => 0,
'month' => 0,
'day' => 0,
'hour' => 0,
'minute' => 0,
'second' => 0,
),
),
'label_position' => 'above',
'text_parts' =>
array (
),
'description' => 'Enter the date and time of the event, and how and when it repeats. The "Date and time repeating From date" and "Date and time repeating To date" are the starting and ending date/time for the first offering of the event. The "Repeat" section below lets you specify when subsequent repetitions will happen.',
'group' => false,
'required' => 1,
'multiple' => 1,
'repeat' => 1,
'todate' => 'optional',
'granularity' =>
array (
'year' => 'year',
'month' => 'month',
'day' => 'day',
'hour' => 'hour',
'minute' => 'minute',
),
'default_format' => 'field_datetime_repeating_default',
'tz_handling' => 'site',
'timezone_db' => 'UTC',
'repeat_collapsed' => '0',
'op' => 'Save field settings',
'module' => 'date',
'widget_module' => 'date',
'columns' =>
array (
'value' =>
array (
'type' => 'datetime',
'not null' => false,
'sortable' => true,
'views' => true,
),
'value2' =>
array (
'type' => 'datetime',
'not null' => false,
'sortable' => true,
'views' => false,
),
'rrule' =>
array (
'type' => 'text',
'not null' => false,
'sortable' => false,
'views' => false,
),
),
'display_settings' =>
array (
'weight' => '1',
'parent' => '',
'label' =>
array (
'format' => 'above',
),
'teaser' =>
array (
'format' => 'field_datetime_repeating_default',
'exclude' => 1,
),
'full' =>
array (
'format' => 'field_datetime_repeating_default',
'exclude' => 0,
),
0 =>
array (
'format' => 'above',
'exclude' => 0,
),
1 =>
array (
'format' => 'field_datetime_repeating_default',
'exclude' => 0,
),
2 =>
array (
'format' => 'field_datetime_repeating_default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'field_datetime_repeating_default',
'exclude' => 0,
),
),
),
);
$content[extra] = array (
'title' => '-5',
'body_field' => '-3',
'menu' => '4',
'taxonomy' => '-4',
'attachments' => '3',
);View exported for generating block (and page) showing upcoming, repeating events:
$view = new view;
$view->name = 'events_ongoing_upcoming';
$view->description = 'Upcoming Ongoing Events';
$view->tag = 'Upcoming Ongoing Events';
$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' => '',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'field_datetime_repeating_value' => array(
'label' => 'Date of first event in series, then repeats (See "Repeats" above)',
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => 1,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_datetime_repeating_value',
'table' => 'node_data_field_datetime_repeating',
'field' => 'field_datetime_repeating_value',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'field_datetime_repeating_value' => array(
'order' => 'ASC',
'delta' => '-1',
'id' => 'field_datetime_repeating_value',
'table' => 'node_data_field_datetime_repeating',
'field' => 'field_datetime_repeating_value',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'event' => 'event',
'event_repeating' => 'event_repeating',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'date_filter' => array(
'operator' => 'between',
'value' => array(
'min' => NULL,
'max' => NULL,
'value' => NULL,
'default_date' => 'now',
'default_to_date' => 'now +32 day',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'date_fields' => array(
'node_data_field_datetime_repeating.field_datetime_repeating_value' => 'node_data_field_datetime_repeating.field_datetime_repeating_value',
),
'date_method' => 'AND',
'granularity' => 'day',
'form_type' => 'date_select',
'default_date' => 'now',
'default_to_date' => 'now +32 day',
'year_range' => '-3:+3',
'id' => 'date_filter',
'table' => 'node',
'field' => 'date_filter',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('title', 'Upcoming Ongoing Events');
$handler->override_option('header', 'A list of regular, ongoing events scheduled for the next four weeks.');
$handler->override_option('header_format', '3');
$handler->override_option('header_empty', 0);
$handler->override_option('use_more', 1);
$handler->override_option('distinct', 0);
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'field_datetime_repeating_value' => array(
'label' => ':',
'link_to_node' => 0,
'label_type' => 'custom',
'format' => 'short',
'multiple' => array(
'group' => 1,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_datetime_repeating_value',
'table' => 'node_data_field_datetime_repeating',
'field' => 'field_datetime_repeating_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'event' => 'event',
'event_repeating' => 'event_repeating',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'date_filter' => array(
'operator' => 'between',
'value' => array(
'value' => NULL,
'min' => NULL,
'max' => NULL,
'default_date' => 'now',
'default_to_date' => 'now +32 day',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'date_fields' => array(
'node_data_field_datetime_repeating.field_datetime_repeating_value' => 'node_data_field_datetime_repeating.field_datetime_repeating_value',
),
'date_method' => 'AND',
'granularity' => 'day',
'form_type' => 'date_select',
'default_date' => 'now',
'default_to_date' => 'now +32 day',
'year_range' => '-3:+3',
'id' => 'date_filter',
'table' => 'node',
'field' => 'date_filter',
'relationship' => 'none',
'override' => array(
'button' => 'Use default',
),
),
));
$handler->override_option('header', '');
$handler->override_option('empty', 'none currently scheduled for the upcoming month');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 5);
$handler->override_option('block_description', 'Upcoming ongoing events');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('fields', array(
'title' => array(
'label' => ':',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
'override' => array(
'button' => 'Use default',
),
),
'field_datetime_repeating_value' => array(
'label' => 'Date and time',
'link_to_node' => 0,
'label_type' => 'custom',
'format' => 'default',
'multiple' => array(
'group' => 1,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_datetime_repeating_value',
'table' => 'node_data_field_datetime_repeating',
'field' => 'field_datetime_repeating_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'field_contact_value' => array(
'label' => '',
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => 1,
'multiple_number' => '1',
'multiple_from' => '0',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_contact_value',
'table' => 'node_data_field_contact',
'field' => 'field_contact_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'field_location_value' => array(
'label' => '',
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_location_value',
'table' => 'node_data_field_location',
'field' => 'field_location_value',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'body' => array(
'label' => '',
'exclude' => 0,
'id' => 'body',
'table' => 'node_revisions',
'field' => 'body',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('header', '<p>This is a list of regularly scheduled, ongoing events coming up during the next four weeks. A separate listing is available for <a href="/upcoming_special_events">one-time, special events</a>.</p>
<p> </p>');
$handler->override_option('header_format', '1');
$handler->override_option('empty', 'There are no ongoing events currently scheduled for the upcoming month.');
$handler->override_option('empty_format', '4');
$handler->override_option('items_per_page', 20);
$handler->override_option('path', 'upcoming_ongoing_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('title', 'Upcoming Ongoing Events - SOI Toronto Centres');
$handler->override_option('style_plugin', 'rss');
$handler->override_option('style_options', array(
'mission_description' => 0,
'description' => 'Upcoming ongoing events scheduled at the SOI Toronto Centres website',
));
$handler->override_option('row_plugin', 'node_rss');
$handler->override_option('row_options', array(
'item_length' => 'title',
));
$handler->override_option('path', 'feeds/upcoming_ongoing_events/rss.xml');
$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(
'block_1' => 'block_1',
'page_1' => 'page_1',
'default' => 0,
));
$handler->override_option('sitename_title', 0);
Comments
Comment #1
les limIt looks as if this already being discussed at #302498: Event repeats in Views when date has multiple dates. You might want to go add your two cents over to that issue.
Comment #2
ericm commentedYes, thank you lesmana. This appears to be the same problem being discussed there.