diff --git a/src/Plugin/migrate/destination/EntityReferenceRevisions.php b/src/Plugin/migrate/destination/EntityReferenceRevisions.php index ce891b6..54388cc 100644 --- a/src/Plugin/migrate/destination/EntityReferenceRevisions.php +++ b/src/Plugin/migrate/destination/EntityReferenceRevisions.php @@ -47,12 +47,12 @@ class EntityReferenceRevisions extends EntityRevision { */ public function getIds() { if ($revision_key = $this->getKey('revision')) { - // TODO: Improve after https://www.drupal.org/node/2783715 is finished. - $ids[$revision_key]['type'] = 'integer'; - $id_key = $this->getKey('id'); $ids[$id_key]['type'] = 'integer'; + // TODO: Improve after https://www.drupal.org/node/2783715 is finished. + $ids[$revision_key]['type'] = 'integer'; + if ($this->isTranslationDestination()) { if ($revision_key = $this->getKey('langcode')) { $ids[$revision_key]['type'] = 'string'; @@ -86,13 +86,10 @@ class EntityReferenceRevisions extends EntityRevision { $row->setDestinationProperty($this->getKey('bundle'), $bundle); } - // Stubs might need some required fields filled in. - if ($row->isStub()) { - $this->processStubRow($row); - } $entity = $this->storage->create($row->getDestination()); $entity->enforceIsNew(); } + $entity = $this->updateEntity($entity, $row) ?: $entity; return $entity; }