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,10 @@ 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" * } 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 @@ -8,6 +8,7 @@ namespace Drupal\migrate_drupal\Plugin; +use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\migrate\Plugin\MigratePluginManager; use Drupal\migrate\Entity\MigrationInterface; @@ -35,7 +36,7 @@ } } } - return FALSE; + throw new PluginNotFoundException($field_type); } } 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 @@ -75,10 +75,12 @@ * The cckfield plugin instance. */ 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); + if ($this->cckPluginManager->hasDefinition($field_type)) { + if (empty($this->cckPluginCache[$field_type])) { + $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($field_type, ['core' => $core], $migration); + } + return $this->cckPluginCache[$field_type]; } - return $this->cckPluginCache[$field_type]; } } 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,10 +39,8 @@ if (isset($fields['node'][$bundle])) { foreach ($fields['node'][$bundle] as $field => $data) { // Process through a CckFieldPlugin if available. - if ($this->cckPluginManager->hasDefinition($data['type'])) { - if ($cckplugin = $this->getCckPlugin($data['type'], 7)) { - $cckplugin->processCckFieldValues($migration, $field, $data); - } + if ($cckplugin = $this->getCckPlugin($data['type'], 7)) { + $cckplugin->processCckFieldValues($migration, $field, $data); } else { $migration->setProcessOfProperty($field, $field);