Not 100% if this one belongs to here...
I am suing drup 5.7. and cck 5.1.6
I created a CCK date field, and set a few options. I exported the content type, the date related-portion is included at the end. When I tried to import the content type, I got errors. I traced into the code and saw two issues:
1. In this section
'granularity' =>
array (
'H' => true,
'N' => true,
0 => 1, // offending line
'Y' => false,
'M' => false,
'D' => false,
'S' => false,
),
the offending line ( 0=> 1) will cause form.inc (line 557-560) to set form error. I had to remove that line to get around the problem.
2. In form.inc form_set_error() line 592, the variable is static, therefore, once the error is set, it will stay there (unless it is cleared). The side effect on the CCK import is that every fields after date field will all fail, because the error is never cleared.
I don't know if this is intended behavior or a bug.
Since I'm already here, if any expert is reviewing this issue, I have a question about time zone, is there a way to set the time zone to the default system time zone, instead of a fixed value?
thanks!
$content[fields] = array (
0 =>
array (
'widget_type' => 'date_text',
'label' => 'Start Time',
'weight' => '0',
'default_value' => 'blank',
'default_value_custom' => '',
'default_value2' => 'blank',
'default_value_custom2' => '',
'input_format' => 'site-wide',
'input_format_custom' => 'h:i A',
'description' => '',
'group' => 'group_test',
'required' => '1',
'multiple' => '0',
'todate' => '',
'granularity' =>
array (
'H' => true,
'N' => true,
0 => 1, // offending line
'Y' => false,
'M' => false,
'D' => false,
'S' => false,
),
'output_format_date' => 'm/d/Y - H:i',
'output_format_custom' => 'h:i A',
'output_format_date_long' => 'l, F j, Y - H:i',
'output_format_custom_long' => '',
'output_format_date_medium' => 'D, m/d/Y - H:i',
'output_format_custom_medium' => '',
'output_format_date_short' => 'm/d/Y - H:i',
'output_format_custom_short' => '',
'tz_handling' => 'none',
'timezone_db' => 'UTC',
'field_timezone' => 'US/Arizona',
'field_name' => 'field_start_time',
'field_type' => 'date',
'module' => 'date',
),
Comments
Comment #1
newbuntu commentedsorry for the typo, i don't think it allows me to edit after I posted it.
The first two lines should be:
Not 100% sure if this one belongs to here...
I am using drup 5.7. and cck 5.1.6.
It would be great if someone has permission can change it.
Comment #2
karens commentedSame source of problem as #128038: Critical failures using drupal_execute() on nodes with CCK fields.