Like Cheek in #781088-20: Updating CCK Fields and Data from D6 to D7
Sorry, I don't know which video is causing the problem, I have about 1500 videos.
The problem is pretty straightforward though. The text field is set to 'longtext' in the D6 database. The migration module is trying to copy the data into 'varchar(255)' field and it doesn't fit because it's smaller.
Probably line 319:
$field_value['settings']['max_length'] = 255;I'll run a php script to substr() my fields to 255 and run the upgrade again to test when I have the time..
And Stol in #781088-148: Updating CCK Fields and Data from D6 to D7:
like #20 I cannot update my fields because 'longtext' columns are converted to varchar(255)
There seems to be an issue with longtext columns not being migrated to the proper field.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1078804-3.long-text-not-varchar-255.patch | 1.42 KB | dww |
Comments
Comment #1
Stol CreditAttribution: Stol commentedI added a 'case:' switch at line 63 in 'content_migrate.text.inc'. Like this:
If someone wants to check this to make a patch?
Comment #2
steinmb CreditAttribution: steinmb commentedSubscribe
Comment #3
dwwRan into this myself during a migration I'm attempting right now. Here's the patch I used. You don't just always want to use long_text -- varchar is faster if you can get away with it. But, in cases where you have text fields without a max_length, truncating to 255 can't work. See the inline code comments.
Comment #4
KarenS CreditAttribution: KarenS commentedSo here's the problem. There are two widgets in D6, 'text_textfield' and 'text_textarea'. If you want a longtext field you should have been using the 'text_textarea' widget. If you do, the field gets converted correctly with the code as it is. If you have a longtext field that uses the 'text_textfield' widget, there is a problem with your D6 data.
The migration code assumes you have the right widget and makes the field type selection based on that.
So how did you end up with the wrong widget? Why would you use a textfield widget for longtext data?
Comment #5
KarenS CreditAttribution: KarenS commentedHmm, after trying this out, I see it *is* possible to create a longtext field in D6 when using a textfield widget, for whatever reason you would do that. So maybe we need this. I'm trying to figure out various ways the data might be configured in D6 to make sure it makes it to D7 in the same format.
Comment #6
KarenS CreditAttribution: KarenS commentedCommitted this, or pretty close to this.
Comment #8
asb CreditAttribution: asb commentedsub