I'm doing a D6 to D7 migration and one of the fields being migrated is a link field. The link module provides the necessary arguments to be able to get results for both link title and attributes. The D6 link module holds these in two columns in the table. When getSourceValues() runs to build up the field result set it mistakenly sees anything with the ":title" argument as a file field and therefore expects the :title to be a serialized array, unserialised into $data['title']. The following bit of code is expecting $data['title']:
elseif ($display_name == "$field_name:title") {
$row->{$index}[] = $data['title'];
}
I'm not sure what the solution to this issue is. Maybe:
elseif ($display_name == "$field_name:title") {
if (isset($data['title'])) {
$row->{$index}[] = $data['title'];
}
else {
$row->{$index}[] = $field_row->$column_name;
}
}
Thoughts?
Comment | File | Size | Author |
---|---|---|---|
#5 | migrate_d2d-title-subfields-2065365-5.patch | 1.11 KB | mikeryan |
#1 | migrate_d2d-fix-title-subfield-handling-2065365.patch | 1.07 KB | whastings |
Comments
Comment #1
whastings CreditAttribution: whastings commentedThat worked for me. I made a patch of the change, in case that helps.
Comment #2
mrP CreditAttribution: mrP commentedComment #3
drasgardian CreditAttribution: drasgardian commentedThanks, this helped me migrate the link titles.
Comment #4
jeffamFixed link title subfield migration for me, too. Nice find, tanc! And thanks for the patch, whastings!
Comment #5
mikeryanGood, but let's generalize it for alt and description as well (I'm sure there are other field types at least using description).
Comment #6
sittard CreditAttribution: sittard commentedWorked for me as well - thanks.
Comment #7
mvcthanks!
Comment #9
mikeryanCommitted, thanks!