Hello,

I think this may be a problem with the date module, but I'm not completely sure. I am trying to export content types containing date_select fields using CCK's content_copy module. I have set the input type of the fields to 'select list', however, when I export and then import the input type is setting to text field types.

I have figured out that what is happening is related to the text_parts field in the export. It seems strange though. My fields export like this:

...
    'text_parts' =>
    array (
      'year' => 0,
      'mon' => 0,
      'mday' => 0,
    ),
...

which seems like it should be correct, however this does not import correctly. If I manually change it to this, it works as desired:

...
 'text_parts' =>
    array (
      'year' => 1,
      'mon' => 1,
      'mday' => 1,
    ),
...

It gets stranger though. This data is stored in the node_field_instance table, field widget_settings. The value for 'select list' input type appears to be 0 on the cck form, however when it saves, the widget_settings field looks like this:

..."text_parts";a:0:{}...

Meaning it is saving an empty array for text_parts, this functions like it should (select_list input_type)

However, when I try to do an import with the text parts set to 0 it saves like this, which looks correct, but does not work (input_type as text fields)

..."text_parts";a:3:{s:4:"year";i:0;s:3:"mon";i:0;s:4:"mday";i:0;}...

Does that make sense? I can try to provide more information if this is not clear. I am thinking it must have something to do with the input_types defaulting to 0 (select_type) if the values for the text_part arrays are unset, but not if they are set to 0... that's my best guess and why I think this is related to the date module, and not the content_copy module, although I have made an issue there as well :).

Comments

KarenS’s picture

Status: Active » Fixed

I'm not making changes to the 5.1 version. I'm officially recommending you move to the 5.2 version now. If you have problems in that version you can check for existing issues or add new ones. Feature requests are now getting posted to the D6 version to be back-ported to 5.2.

There were some problems in CCK's Content Copy code that contributed to this problem, plus I made some fixes in the 5.2 version, so update to Date 5.2 and get the latest CCK code.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.