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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

whastings’s picture

That worked for me. I made a patch of the change, in case that helps.

mrP’s picture

Status: Active » Needs review
drasgardian’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Thanks, this helped me migrate the link titles.

jeffam’s picture

Fixed link title subfield migration for me, too. Nice find, tanc! And thanks for the patch, whastings!

mikeryan’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.11 KB

Good, but let's generalize it for alt and description as well (I'm sure there are other field types at least using description).

sittard’s picture

Worked for me as well - thanks.

mvc’s picture

Status: Needs review » Reviewed & tested by the community

thanks!

  • mikeryan committed b8bfd8b on 7.x-2.x
    Issue #2065365 by whastings,mikeryan: Better subfield migration from D6
    
mikeryan’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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