Hello,

years ago i created a CCK FileField... I used this field for uploading images.

Now, i want to migrate to Drupal7, and the only way to convert that CCK FileField into a D7 ImageField would be to convert tthe D6 FileField into an ImageFIeld first.

Is this possible? Can i use the "core upload" migration script?

Comments

quicksketch’s picture

the only way to convert that CCK FileField into a D7 ImageField would be to convert tthe D6 FileField into an ImageFIeld first.

I'm not really sure why that would be, but you can change a filefield into an imagefield just by changing the widget on the field. An ImageField *is* a FileField, just with a different upload widget. The data storage for both types of fields is identical, so I'm surprised that you would need to "convert" from one to the other, since they both have the same data.

Sifro’s picture

cool, it was very easy, and the migration was succesful. Thanks.

quicksketch’s picture

Status: Active » Closed (fixed)
kevinsiji’s picture

I realized this hurdle in the middle of a migration. Instead of going back to D6, change the field widget and starting all over again, I went and edited the table "content_node_field_instance" in the db.

Find the row for my filefield(for an image), and SET `widget_type` = 'imagefield_widget'. Also updated the serialized data in `widget_settings` accordingly (copied from another image field.)

CobraMP’s picture

Issue summary: View changes

thank you #4 -
unconverted my field
went to phpmyadmin and changed the widget type from filefield_widget to imagefield_widget
didn't even have to change the field type
on convert it fixed all my fields to field type image.