diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php index 0dac82c..2deec37 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php @@ -109,9 +109,7 @@ public function import(Row $row, array $old_destination_id_values = array()) { */ protected function getEntity(Row $row, array $old_destination_id_values) { if ($row->stub()) { - // Try to find the entity_type in 'constants/entity_type' otherwise - // fallback to 'node'. - $stub_commented_entity_type = isset($this->migration->source['constants']['entity_type']) ? $this->migration->source['constants']['entity_type'] : 'node'; + $stub_commented_entity_type = $row->getDestinationProperty('entity_type'); // While parent::getEntity() fills the bundle property for stub entities // if it's still empty, here we must also make sure entity_id/entity_type