36c36 < index 090b883..de1570c 100644 --- > index 24d5e71..de1570c 100644 39c39 < @@ -7,9 +7,9 @@ --- > @@ -7,6 +7,8 @@ 46,47d45 < -use Drupal\Core\Config\ConfigEvents; < -use Drupal\Core\Config\Entity\ConfigStorageControllerInterface; 50,51c48 < use Drupal\Core\Entity\EntityStorageException; < @@ -73,7 +73,7 @@ class ConfigImporter extends DependencySerialization { --- > @@ -71,7 +73,7 @@ class ConfigImporter extends DependencySerialization { 60c57 < @@ -92,6 +92,20 @@ class ConfigImporter extends DependencySerialization { --- > @@ -90,6 +92,20 @@ class ConfigImporter extends DependencySerialization { 81c78 < @@ -105,13 +119,19 @@ class ConfigImporter extends DependencySerialization { --- > @@ -103,13 +119,19 @@ class ConfigImporter extends DependencySerialization { 102c99 < @@ -210,6 +230,10 @@ public function import() { --- > @@ -208,6 +230,10 @@ public function import() { 113c110 < @@ -343,4 +367,126 @@ public function alreadyImporting() { --- > @@ -341,4 +367,126 @@ public function alreadyImporting() { 556c553 < index 6976e42..3661b32 100644 --- > index 6976e42..21f8874 100644 559c556 < @@ -184,6 +184,13 @@ public function addDefaultField($entity_type, $bundle, $field_name = 'comment', --- > @@ -184,6 +184,14 @@ public function addDefaultField($entity_type, $bundle, $field_name = 'comment', 566c563,564 < + if ($display) { --- > + // Only update existing displays. > + if ($display && !$display->isNew()) { 573c571 < @@ -192,6 +199,14 @@ public function addDefaultField($entity_type, $bundle, $field_name = 'comment', --- > @@ -192,6 +200,15 @@ public function addDefaultField($entity_type, $bundle, $field_name = 'comment', 577c575 < + // The comment field should be hidden in all other view displays. --- > + // The comment field should be hidden in all other view displays. 580c578,579 < + if ($display) { --- > + // Only update existing displays. > + if ($display && !$display->isNew()) { 671c670 < index 0000000..a915b20 --- > index 0000000..9f7f707 674c673 < @@ -0,0 +1,110 @@ --- > @@ -0,0 +1,109 @@ 684d682 < + 1147a1146,1162 > diff --git a/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php > index 1a2bc5e..2da0a8a 100644 > --- a/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php > +++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php > @@ -178,7 +178,11 @@ public function calculateDependencies() { > // Depend on configured modes. > if ($this->mode != 'default') { > $mode_entity = \Drupal::entityManager()->getStorageController($this->displayContext . '_mode')->load($target_entity_type->id() . '.' . $this->mode); > - $this->addDependency('entity', $mode_entity->getConfigDependencyName()); > + // It is possible to add modes via hook_entity_form_mode_info_alter(). > + // @see entity_test_entity_form_mode_info_alter() > + if ($mode_entity) { > + $this->addDependency('entity', $mode_entity->getConfigDependencyName()); > + } > } > return $this->dependencies; > } 1149c1164 < index 7da287c..3283962 100644 --- > index 3b2b503..d1731d3 100644 1152,1153c1167,1168 < @@ -772,4 +772,11 @@ public function getColumns() { < return $this->field->getColumns(); --- > @@ -793,4 +793,11 @@ public function hasCustomStorage() { > return $this->field->hasCustomStorage();