SO im migrating content from d6 to d7 but i cannot seem to get images to work.

    $this->addFieldMapping('field_checklist_badge_active', 'field_checklist_badge_active')
      ->sourceMigration('filemigration');
    $this->addFieldMapping('field_checklist_badge_active:file_class')
      ->defaultValue('MigrateFileFid');
  • field_checklist_badge_active is a fid in the $row array.
class FileMigration extends DrupalFile6Migration {
  public function __construct(array $arguments) {
    parent::__construct($arguments);
  }
}

and for the migrate hook:

  $api['migrations']['filemigration'] = $common_arguments + array(
      'machine_name' => 'filemigration',
      'description' => t('Import Drupal 6 files'),
      'class_name' => 'FileMigration', // custom class that extends the DrupalFile6Migration and nothing more
      'default_uid' => 1,
      'source_dir' => 'http://test.be',
      'destination_dir' => 'public://',
    );

If I run the files migration from the ui or drush they do get imported, but it seems the "sourceMigration" is not working.

Am i missing something? I also do not get any logging of what might have happened wrong.

Regards,
Mo

Comments

mojo4444 created an issue.

mojo4444’s picture

Bump