diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php
index 451f2d5..981b54e 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php
@@ -30,6 +30,20 @@ class EntityComment extends EntityContentBase {
   protected $state;
 
   /**
+   * The entity ID used for 'commented entity' objects in stub rows.
+   *
+   * @var string
+   */
+  protected $stubCommentedEntityId;
+
+  /**
+   * The entity type used for 'commented entity' objects in stub rows.
+   *
+   * @var string
+   */
+  protected $stubCommentedEntityType;
+
+  /**
    * Builds an comment entity destination.
    *
    * @param array $configuration
@@ -87,4 +101,28 @@ public function import(Row $row, array $old_destination_id_values = array()) {
     return $return;
   }
 
+  protected function getEntity(Row $row, array $old_destination_id_values) {
+    if ($row->stub()) {
+      // Comment::postSave() requires $entity->getCommentedEntity() to be of
+      // type ContentEntityInterface; we can't leave it empty.
+      if (empty($this->stubCommentedEntityId)) {
+        // Since it's hard to derive the 'right' source values for this stub
+        // record in a migration agnostic way, and since the entity will be
+        // overwritten anyway... just try to pick a node.
+        $result = \Drupal::entityQueryAggregate('node')
+          ->aggregate('nid', 'MIN')
+          ->execute();
+        if ($result) {
+          $this->stubCommentedEntityId = $result[0]['nid_min'];
+          $this->stubCommentedEntityType = 'node';
+        }
+      }
+      if (!empty($this->stubCommentedEntityId)) {
+        $row->setDestinationProperty('entity_id', $this->stubCommentedEntityId);
+        $row->setDestinationProperty('entity_type', $this->stubCommentedEntityType);
+      }
+    }
+    return parent::getEntity($row, $old_destination_id_values);
+  }
+
 }
