diff --git a/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php b/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php index 7946330..9c11588 100644 --- a/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php +++ b/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php @@ -127,7 +127,10 @@ public function applyUpdates() { } } } - // Process entity type definition changes. + // Process entity type definition changes after storage definitions ones + // as entity type updates might create base fields as well. That way, if + // both occur at the same time it does not lead to problems due to the + // base field creation being applied twice. if (!empty($change_list['entity_type']) && $change_list['entity_type'] == static::DEFINITION_UPDATED) { $entity_type = $this->entityManager->getDefinition($entity_type_id); $original = $this->entityManager->getLastInstalledDefinition($entity_type_id);