diff --git a/core/includes/entity.inc b/core/includes/entity.inc index e010aad..3025433 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -69,8 +69,10 @@ function entity_invoke_bundle_hook($hook, $entity_type, $bundle, $bundle_new = N } // Invoke hook_entity_bundle_*() hooks. \Drupal::moduleHandler()->invokeAll('entity_bundle_' . $hook, array($entity_type, $bundle, $bundle_new)); - // Clear the cached field definitions. - $entity_manager->clearCachedFieldDefinitions(); + // Clear the cached field definitions (not needed in case of 'create'). + if ($hook == 'rename' || $hook == 'delete') { + $entity_manager->clearCachedFieldDefinitions(); + } } /**