Closed (duplicate)
Project:
Date
Version:
6.x-2.x-dev
Component:
Date API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2009 at 19:29 UTC
Updated:
1 Apr 2009 at 21:14 UTC
Whenever saving or updating an event, I get this block of errors:
warning: date_timezone_set() expects parameter 1 to be DateTime, null given in /var/www/people/sites/all/modules/date/date_api_ical.inc on line 568.
warning: date_format() expects parameter 1 to be DateTime, null given in /var/www/people/sites/all/modules/date/date_api_ical.inc on line 654.
warning: date_timezone_set() expects parameter 1 to be DateTime, null given in /var/www/people/sites/all/modules/date/date_api_ical.inc on line 568.
warning: date_format() expects parameter 1 to be DateTime, null given in /var/www/people/sites/all/modules/date/date_api_ical.inc on line 654.
Here's the export of the field:
$content['fields'] = array (
0 =>
array (
'label' => 'Date',
'field_name' => 'field_date',
'type' => 'datetime',
'widget_type' => 'date_popup_repeat',
'change' => 'Change basic information',
'weight' => '-4',
'default_value' => 'now',
'default_value2' => 'strtotime',
'default_value_code' => '',
'default_value_code2' => '+ 1 hour',
'input_format' => 'Y-m-d H:i:s',
'input_format_custom' => 'Y-m-d H:i:s',
'year_range' => '0:+1',
'increment' => '15',
'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' => '',
'group' => false,
'required' => 1,
'multiple' => 1,
'repeat' => 1,
'todate' => 'optional',
'granularity' =>
array (
'year' => 'year',
'month' => 'month',
'day' => 'day',
'hour' => 'hour',
'minute' => 'minute',
),
'default_format' => 'long',
'tz_handling' => 'site',
'timezone_db' => 'UTC',
'repeat_collapsed' => '1',
'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 (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
);
This has been happening in all recent dev Date modules since at least the Mar25th dev release.
Comments
Comment #1
sbayne commentedSeems to be the same issue as:
http://drupal.org/node/409476.
I also find that setting a repeat prevents the error from appearing.
Also setting a repeat, saving, then removing the repeat, seems to leave the event in a state where subsequent edits will not throw the error.
nope, spoke too soon. you get an error-free save when you clear the repeat, but subsequent edits DO throw the error.
Comment #2
sbayne commentedComment #3
sbayne commentedThe patch towards the end of http://drupal.org/node/409476, once manually applied appears to fix this issue.