diff -u b/core/modules/field/migration_templates/d7_field.yml b/core/modules/field/migration_templates/d7_field.yml --- b/core/modules/field/migration_templates/d7_field.yml +++ b/core/modules/field/migration_templates/d7_field.yml @@ -22,7 +22,6 @@ email: email file: file image: image - link_field: link list_boolean: boolean list_integer: list_integer list_text: list_string @@ -30,10 +29,6 @@ number_decimal: decimal number_float: float phone: telephone - taxonomy_term_reference: entity_reference - text: text - text_long: text_long - text_with_summary: text_with_summary translatable: translatable cardinality: cardinality settings: diff -u b/core/modules/field/src/Plugin/migrate/process/d7/FieldType.php b/core/modules/field/src/Plugin/migrate/process/d7/FieldType.php --- b/core/modules/field/src/Plugin/migrate/process/d7/FieldType.php +++ b/core/modules/field/src/Plugin/migrate/process/d7/FieldType.php @@ -64,11 +64,11 @@ public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { $cckplugin = $this->cckPluginManager->createInstance($value, ['core' => 7]); if ($cckplugin) { - return $cckplugin->getFieldType($row); - } - else { - return parent::transform($value, $migrate_executable, $row, $destination_property); + if ($cckplugin->getFieldType($row)) { + return $cckplugin->getFieldType($row); + } } + return parent::transform($value, $migrate_executable, $row, $destination_property); } } diff -u b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php --- b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php +++ b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php @@ -14,7 +14,10 @@ * @MigrateCckField( * id = "link", * field_type = "link", - * core = {6} + * core = {6,7}, + * type_map = { + * "link_field" = "link" + * } * ) */ class LinkField extends CckFieldPluginBase { diff -u b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManager.php b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManager.php --- b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManager.php +++ b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManager.php @@ -54,9 +54,10 @@ if (in_array($configuration['core'], $definition['core'])) { - if ($field_type === $definition['field_type'] || $field_type === $plugin_id) { + if (key_exists($field_type, $definition['type_map']) || $field_type === $plugin_id) { return parent::createInstance($plugin_id, $configuration, $migration); } } } return FALSE; } + } diff -u b/core/modules/migrate_drupal/src/Plugin/migrate/builder/d6/CckMigration.php b/core/modules/migrate_drupal/src/Plugin/migrate/builder/d6/CckMigration.php --- b/core/modules/migrate_drupal/src/Plugin/migrate/builder/d6/CckMigration.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/builder/d6/CckMigration.php @@ -57,7 +57,7 @@ // Allow the cckfield plugin to alter the migration as necessary so that // it knows how to handle fields of this type. $this->cckPluginManager - ->createInstance($field_type, ['core' => 6], $migration) + ->createInstance($field_type, ['core' => 6], $migration) ->{$this->configuration['cck_plugin_method']}($migration); } } diff -u b/core/modules/node/src/Plugin/migrate/builder/d7/Node.php b/core/modules/node/src/Plugin/migrate/builder/d7/Node.php --- b/core/modules/node/src/Plugin/migrate/builder/d7/Node.php +++ b/core/modules/node/src/Plugin/migrate/builder/d7/Node.php @@ -39,8 +39,10 @@ if (isset($fields['node'][$bundle])) { foreach ($fields['node'][$bundle] as $field => $data) { // Process through a CckFieldPlugin if available. - if ($cckplugin = $this->getCckPlugin($data['type'], 7)) { - $cckplugin->processCckFieldValues($migration, $field, $data); + if ($this->cckPluginManager->hasDefinition($data['type'])) { + if ($cckplugin = $this->getCckPlugin($data['type'], 7)) { + $cckplugin->processCckFieldValues($migration, $field, $data); + } } else { $migration->setProcessOfProperty($field, $field); diff -u b/core/modules/taxonomy/src/Plugin/migrate/cckfield/TaxonomyTermReference.php b/core/modules/taxonomy/src/Plugin/migrate/cckfield/TaxonomyTermReference.php --- b/core/modules/taxonomy/src/Plugin/migrate/cckfield/TaxonomyTermReference.php +++ b/core/modules/taxonomy/src/Plugin/migrate/cckfield/TaxonomyTermReference.php @@ -14,6 +14,9 @@ * @MigrateCckField( * id = "taxonomy_term_reference", * field_type = "taxonomy_term_reference", + * type_map = { + * "taxonomy_term_reference" = "entity_reference" + * }, * core = {6,7} * ) */ diff -u b/core/modules/text/src/Plugin/migrate/cckfield/TextField.php b/core/modules/text/src/Plugin/migrate/cckfield/TextField.php --- b/core/modules/text/src/Plugin/migrate/cckfield/TextField.php +++ b/core/modules/text/src/Plugin/migrate/cckfield/TextField.php @@ -15,6 +15,11 @@ * @MigrateCckField( * id = "text", * field_type = "text", + * type_map = { + * "text" = "text", + * "text_long" = "text_long", + * "text_with_summary" = "text_with_summary" + * }, * core = {6,7} * ) */ @@ -120,6 +125,7 @@ case 'text_textarea': return 'text_long'; default: + return parent::getFieldType($row); break; } }