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,6 +22,7 @@ email: email file: file image: image + link_field: link list_boolean: boolean list_integer: list_integer list_text: list_string @@ -29,6 +30,8 @@ number_decimal: decimal number_float: float phone: telephone + 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/d6/FieldType.php b/core/modules/field/src/Plugin/migrate/process/d6/FieldType.php --- b/core/modules/field/src/Plugin/migrate/process/d6/FieldType.php +++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldType.php @@ -64,11 +64,11 @@ public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { list ($field_type, $widget_type) = $value; - $cckplugin = $this->cckPluginManager->createInstance($field_type, ['core' => 6]); - if ($cckplugin) { - return $cckplugin->getFieldType($row); + try { + return $this->cckPluginManager->createInstance($field_type, ['core' => 6]) + ->getFieldType($row); } - else { + catch (PluginNotFoundException $e) { return parent::transform($value, $migrate_executable, $row, $destination_property); } } 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 @@ -62,13 +62,12 @@ * {@inheritdoc} */ public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { - $cckplugin = $this->cckPluginManager->createInstance($value, ['core' => 7]); - if ($cckplugin) { - if ($cckplugin->getFieldType($row)) { - return $cckplugin->getFieldType($row); - } + try { + return $this->cckPluginManager->createInstance($value, ['core' => 7]) + ->getFieldType($row); + } catch (PluginNotFoundException $e) { + return parent::transform($value, $migrate_executable, $row, $destination_property); } - 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,7 @@ * @MigrateCckField( * id = "link", * field_type = "link", - * core = {6,7}, + * core = {6}, * type_map = { * "link_field" = "link" * } reverted: --- b/core/modules/migrate_drupal/migrate_drupal.services.yml +++ a/core/modules/migrate_drupal/migrate_drupal.services.yml @@ -1,6 +1,6 @@ services: plugin.manager.migrate.cckfield: + class: Drupal\migrate\Plugin\MigratePluginManager - class: Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManager arguments: - cckfield - '@container.namespaces' reverted: --- b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManager.php +++ /dev/null @@ -1,41 +0,0 @@ -getDefinitions() as $plugin_id => $definition) { - if (in_array($configuration['core'], $definition['core'])) { - if (array_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/CckBuilder.php b/core/modules/migrate_drupal/src/Plugin/migrate/builder/CckBuilder.php --- b/core/modules/migrate_drupal/src/Plugin/migrate/builder/CckBuilder.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/builder/CckBuilder.php @@ -76,9 +76,15 @@ */ protected function getCckPlugin($field_type, $core = 6, MigrationInterface $migration = NULL) { if (empty($this->cckPluginCache[$field_type])) { - $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($field_type, ['core' => $core], $migration); + foreach ($this->cckPluginManager->getDefinitions() as $plugin_id => $definition) { + if (in_array($core, $definition['core'])) { + if (array_key_exists($field_type, $definition['type_map']) || $field_type === $plugin_id) { + return ($this->cckPluginCache[$field_type] = $this->cckPluginManager->createinstance($field_type, [], $migration)); + } + } + } } - return $this->cckPluginCache[$field_type]; + return ($this->cckPluginCache[$field_type]); } } diff -u b/core/modules/node/src/Plugin/migrate/builder/d6/Node.php b/core/modules/node/src/Plugin/migrate/builder/d6/Node.php --- b/core/modules/node/src/Plugin/migrate/builder/d6/Node.php +++ b/core/modules/node/src/Plugin/migrate/builder/d6/Node.php @@ -57,11 +57,13 @@ if (isset($fields[$node_type])) { foreach ($fields[$node_type] as $field => $info) { // Process through a CckFieldPlugin if available. - if ($cckplugin = $this->getCckPlugin($info['type'], 6)) { - $cckplugin->processCckFieldValues($migration, $field, $info); - } - else { - $migration->setProcessOfProperty($field, $field); + if ($this->cckPluginManager->hasDefinition($info['type'])) { + if ($cckplugin = $this->getCckPlugin($info['type'], 6)) { + $cckplugin->processCckFieldValues($migration, $field, $info); + } + else { + $migration->setProcessOfProperty($field, $field); + } } } }