I refer to this block in modules/contrib/filefield.inc, lines 23-25, within the filefield_migrate_prepare_node function:
elseif (isset($fields[$source_key]['default_value']) && $fields[$source_key]['default_value'] != '') {
$source_file = $fields[$source_key]['default_value'];
}
As near as I can tell, there is no $fields variable in the scope of this function. I think you meant to refer to $tblinfo->fields. It seems that it should be:
elseif (isset($tblinfo->fields[$source_key]['default_value']) && $tblinfo->fields[$source_key]['default_value'] != '') {
$source_file = $tblinfo->fields[$source_key]['default_value'];
}
Otherwise I don't understand what this part of the code it trying to accomplish.
Comments
Comment #1
mikeryanComment #2
mikeryanFilefield support has been moved to the migrate_extras module.
Comment #3
stella commentedI had the same problem. However, I don't think there is any need for this bit of code which checks if a field mapping or a default value have been provided. All of this has already been done by the migrate module and it's populated the $node object with the field setting. Attached patch fixes this.
Comment #4
frankcarey commentedcommitted patch to dev