diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
index e92930ab62..b64ea0eec8 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
@@ -91,16 +91,21 @@ public function createWithSampleValues($bundle = FALSE, array $values = []) {
       $forbidden_keys[] = $revision_key;
     }
     if ($bundle_key = $this->entityType->getKey('bundle')) {
-      if (!$bundle) {
-        throw new EntityStorageException("No entity bundle was specified");
+      if ($bundle) {
+        if (!array_key_exists($bundle, $this->entityManager->getBundleInfo($this->entityTypeId))) {
+          throw new EntityStorageException(sprintf("Missing entity bundle. The \"%s\" bundle does not exist", $bundle));
+        }
+        $values[$bundle_key] = $bundle;
       }
-      if (!array_key_exists($bundle, $this->entityManager->getBundleInfo($this->entityTypeId))) {
-        throw new EntityStorageException(sprintf("Missing entity bundle. The \"%s\" bundle does not exist", $bundle));
-      }
-      $values[$bundle_key] = $bundle;
-      // Bundle is already set
+      // Bundle should not be autogenerated.
       $forbidden_keys[] = $bundle_key;
     }
+
+    // Unless specified, ensure that default_langcode is TRUE.
+    if ($default_langcode_key = $this->entityType->getKey('default_langcode')) {
+      $values += [$default_langcode_key => TRUE];
+    }
+
     // Forbid sample generation on any keys whose values were submitted.
     $forbidden_keys = array_merge($forbidden_keys, array_keys($values));
     /** @var \Drupal\Core\Entity\FieldableEntityInterface $entity */
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php
index eb979c7fd6..315f64d9b8 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php
@@ -36,7 +36,7 @@ public function createTranslation(ContentEntityInterface $entity, $langcode, arr
    *   A fieldable content entity.
    *
    * @throws \Drupal\Core\Entity\EntityStorageException
-   *   Thrown if the bundle does not exist or was needed but not specified.
+   *   Thrown if an unknown bundle was specified.
    */
   public function createWithSampleValues($bundle = FALSE, array $values = []);
 
diff --git a/core/lib/Drupal/Core/Field/FieldItemList.php b/core/lib/Drupal/Core/Field/FieldItemList.php
index 5d13a5e5cc..0b1960f229 100644
--- a/core/lib/Drupal/Core/Field/FieldItemList.php
+++ b/core/lib/Drupal/Core/Field/FieldItemList.php
@@ -260,8 +260,12 @@ public function view($display_options = []) {
   public function generateSampleItems($count = 1) {
     $field_definition = $this->getFieldDefinition();
     $field_type_class = $field_definition->getItemDefinition()->getClass();
+    $values = $this->getValue();
     for ($delta = 0; $delta < $count; $delta++) {
-      $values[$delta] = $field_type_class::generateSampleValue($field_definition);
+      $value = $field_type_class::generateSampleValue($field_definition);
+      if (!is_null($value)) {
+        $values[$delta] = $value;
+      }
     }
     $this->setValue($values);
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php b/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php
index b5bcd487f2..5bbce65bae 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php
@@ -2,7 +2,8 @@
 
 namespace Drupal\KernelTests\Core\Entity;
 
-use Drupal\Core\Entity\FieldableEntityInterface;
+use Drupal\Core\Entity\ContentEntityStorageInterface;
+use Drupal\Core\Entity\EntityInterface;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\node\Entity\NodeType;
 use Drupal\taxonomy\Entity\Vocabulary;
@@ -25,7 +26,21 @@ class CreateSampleEntityTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'field', 'filter', 'text', 'file', 'user', 'node', 'comment', 'taxonomy'];
+  public static $modules = [
+    'system',
+    'field',
+    'filter',
+    'text',
+    'file',
+    'user',
+    'node',
+    'comment',
+    'taxonomy',
+    'menu_link_content',
+    'link',
+    'content_translation',
+    'language',
+  ];
 
   /**
    * {@inheritdoc}
@@ -33,6 +48,8 @@ class CreateSampleEntityTest extends KernelTestBase {
   protected function setUp() {
     parent::setup();
 
+    $this->installSchema('system', ['sequences']);
+
     $this->installEntitySchema('file');
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
@@ -42,6 +59,7 @@ protected function setUp() {
     $this->installEntitySchema('comment_type');
     $this->installEntitySchema('taxonomy_vocabulary');
     $this->installEntitySchema('taxonomy_term');
+    $this->installEntitySchema('menu_link_content');
     $this->entityTypeManager = $this->container->get('entity_type.manager');
     NodeType::create(['type' => 'article', 'name' => 'Article'])->save();
     NodeType::create(['type' => 'page', 'name' => 'Page'])->save();
@@ -55,31 +73,32 @@ protected function setUp() {
    */
   public function testSampleValueContentEntity() {
     foreach ($this->entityTypeManager->getDefinitions() as $entity_type_id => $definition) {
-      if ($definition->entityClassImplements(FieldableEntityInterface::class)) {
-        $label = $definition->getKey('label');
+      $entity_storage = $this->entityTypeManager->getStorage($entity_type_id);
+      if ($entity_storage instanceof ContentEntityStorageInterface) {
         $values = [];
-        if ($label) {
-          $title = $this->randomString();
-          $values[$label] = $title;
+        if ($label = $definition->getKey('label')) {
+          $values[$label] = $this->randomString();
         }
+
         // Create sample entities with bundles.
         if ($bundle_type = $definition->getBundleEntityType()) {
-          foreach ($this->entityTypeManager->getStorage($bundle_type)->loadMultiple() as $bundle) {
-            $entity = $this->entityTypeManager->getStorage($entity_type_id)->createWithSampleValues($bundle->id(), $values);
-            $violations = $entity->validate();
-            $this->assertCount(0, $violations);
-            if ($label) {
-              $this->assertEquals($title, $entity->label());
-            }
-          }
+          $bundles = array_map(function (EntityInterface $entity_type) {
+            return $entity_type->id();
+          }, $this->entityTypeManager->getStorage($bundle_type)->loadMultiple());
         }
         // Create sample entities without bundles.
         else {
-          $entity = $this->entityTypeManager->getStorage($entity_type_id)->createWithSampleValues(FALSE, $values);
+          $bundles = [FALSE];
+        }
+        foreach ($bundles as $bundle) {
+          $entity = $entity_storage->createWithSampleValues($bundle, $values);
+          $entity->save();
+          $entity_storage->resetCache([$entity->id()]);
+          $entity = $entity_storage->load($entity->id());
           $violations = $entity->validate();
-          $this->assertCount(0, $violations);
+          $this->assertCount(0, $violations, (string) $violations);
           if ($label) {
-            $this->assertEquals($title, $entity->label());
+            $this->assertEquals($values[$label], $entity->label());
           }
         }
       }
