diff --git a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php index 8d69f80..a91264d 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php @@ -114,10 +114,7 @@ protected function getEntity(Row $row, array $old_destination_id_values) { $values = $row->getDestination(); // Stubs might not have the bundle specified. if ($row->stub()) { - $bundle_key = $this->getKey('bundle'); - if ($bundle_key && !isset($values[$bundle_key])) { - $values[$bundle_key] = reset($this->bundles); - } + $this->processStubValues($values); } $entity = $this->storage->create($values); $entity->enforceIsNew(); @@ -126,6 +123,21 @@ protected function getEntity(Row $row, array $old_destination_id_values) { } /** + * Process the stub values. + * + * @param array $values + * An array of destination values. + */ + protected function processStubValues(array $values) { + $bundle_key = $this->getKey('bundle'); + if ($bundle_key && !isset($values[$bundle_key])) { + $values[$bundle_key] = reset($this->bundles); + } + + $this->migration->set('process', array_intersect_key($this->migration->get('process'), $this->getIds())); + } + + /** * Returns a specific entity key. * * @param string $key diff --git a/core/modules/migrate_drupal/config/install/migrate.migration.d6_comment.yml b/core/modules/migrate_drupal/config/install/migrate.migration.d6_comment.yml index 31b45f7..dc38654 100644 --- a/core/modules/migrate_drupal/config/install/migrate.migration.d6_comment.yml +++ b/core/modules/migrate_drupal/config/install/migrate.migration.d6_comment.yml @@ -4,7 +4,6 @@ migration_groups: - Drupal 6 source: plugin: d6_comment - timestamp: 0 constants: entity_type: node process: diff --git a/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml b/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml index 3c5d16d..e28173f 100644 --- a/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml +++ b/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml @@ -40,8 +40,6 @@ migrate.source.d6_comment: type: migrate_source_sql label: 'Drupal 6 comment' mapping: - timestamp: - type: integer constants: type: mapping label: 'Constants'