diff --git a/core/lib/Drupal/Core/Entity/EntityTypeManager.php b/core/lib/Drupal/Core/Entity/EntityTypeManager.php
index 5544e4a..f1aad2f 100644
--- a/core/lib/Drupal/Core/Entity/EntityTypeManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityTypeManager.php
@@ -220,7 +220,12 @@ public function getListBuilder($entity_type_id) {
    */
   public function getFormObject($entity_type_id, $operation) {
     if (!$class = $this->getDefinition($entity_type_id, TRUE)->getFormClass($operation)) {
-      throw new InvalidPluginDefinitionException($entity_type_id, sprintf('The "%s" entity type did not specify a "%s" form class.', $entity_type_id, $operation));
+      // If there is not a class specified for this operation, try the default
+      // class. This condition is likely used by form modes added through
+      // the form modes user interface.
+      if (!$class = $this->getDefinition($entity_type_id, TRUE)->getFormClass('default')) {
+        throw new InvalidPluginDefinitionException($entity_type_id, sprintf('The "%s" entity type did not specify a "%s" form class and there is not a default class.', $entity_type_id, $operation));
+      }
     }
 
     $form_object = $this->classResolver->getInstanceFromDefinition($class);
diff --git a/core/modules/system/tests/fixtures/HtaccessTest/access_test.module~ b/core/modules/system/tests/fixtures/HtaccessTest/access_test.module~
deleted file mode 100644
index e69de29..0000000
diff --git a/core/modules/system/tests/fixtures/HtaccessTest/access_test.php~ b/core/modules/system/tests/fixtures/HtaccessTest/access_test.php~
deleted file mode 100644
index e69de29..0000000
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php
index 70cac60..0e2cc96 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php
@@ -268,7 +268,9 @@ public function testGetFormObjectInvalidOperation() {
     $entity->getFormClass('edit')->willReturn('');
     $this->setUpEntityTypeDefinitions(['test_entity_type' => $entity]);
 
-    $this->setExpectedException(InvalidPluginDefinitionException::class);
+    $entity->getFormClass('default')->willReturn('');
+    $this->setExpectedException(InvalidPluginDefinitionException::class,
+      'The "test_entity_type" entity type did not specify a "edit" form class and there is not a default class');
     $this->entityTypeManager->getFormObject('test_entity_type', 'edit');
   }
 
