I had additional fields that I needed translated to CCK. BTW, thanks for a great module.

Here's the diff:

83a88,95
>       else if ($row['field_type'] == 'email') {
>         $nodes[ $row['nid'] ][$cckfield]['email'] = $row['textual_data'];
>       }
>       else if ($row['field_type'] == 'value' 
>       || $row['field_type'] == 'checkbox' 
>       || $row['field_type'] == 'select') {
>         $nodes[ $row['nid'] ][$cckfield]['value'] = $row['numeric_data'];
>       }
114a127,132
>       else if ($value['email']) {
>         db_query( "UPDATE {%s} SET %s = '%s' WHERE nid = %d", $cck_table,  $cckfield . '_email', $value['email'],  $nid);
>       }
>       else if ($value['value']) {
>         db_query( "UPDATE {%s} SET %s = '%s' WHERE nid = %d", $cck_table,  $cckfield . '_value', $value['value'],  $nid);
>       }

In English:

After line 83 add:

       else if ($row['field_type'] == 'email') {
         $nodes[ $row['nid'] ][$cckfield]['email'] = $row['textual_data'];
       }
       else if ($row['field_type'] == 'value' 
       || $row['field_type'] == 'checkbox' 
       || $row['field_type'] == 'select') {
         $nodes[ $row['nid'] ][$cckfield]['value'] = $row['numeric_data'];
       }

After line 114 add:

       else if ($value['email']) {
         db_query( "UPDATE {%s} SET %s = '%s' WHERE nid = %d", $cck_table,  $cckfield . '_email', $value['email'],  $nid);
       }
       else if ($value['value']) {
         db_query( "UPDATE {%s} SET %s = '%s' WHERE nid = %d", $cck_table,  $cckfield . '_value', $value['value'],  $nid);
       }

Comments

starbow’s picture

Category: bug » feature
liquidcms’s picture

Anyone tested these to see if they work?

I have tried importing select fields with no luck.

liquidcms’s picture

although i have tried changes to 4.7 version of flexiconvert not 5.02 as listed here.

Figured i would try converting flexi to cck before conversion to drupal 5 - but i guess i could do them in the other order.

liquidcms’s picture

ok, well now that i have looked through the tables it does seem like the flexi data for my select lists has been converted to cck tables - but sadly the fields do not show when i look at the nodes that use these select lists.

liquidcms’s picture

ok, sorted it out... the issue was that the original flexi select list looked like:

Govt|LA|NAEPP|EHA|Other

and i set up new cck options as:

Govt
LA
NAEPP
EHA
Other

and i should actually have set it up as:

1|Govt
2|LA
3|NAEPP
4|EHA
5|Other
anarcat’s picture

Status: Active » Needs work

Please roll a real patch. Also, 5.x has been rewritten, please test if those fields are imported properly in the 5.x-0.3 release.