diff --git a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php index cab863b..e8ff98e 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php @@ -317,8 +317,8 @@ public function save() { $this->module = $field_type['module']; $this->active = 1; - // Create all per-field-type properties (needed here as long as we have - // settings that impact column definitions). + // Make sure all settings are present, so that a complete field + // definition is passed to the various hooks and written to config. $this->settings += $field_type['settings']; // Provide default storage. @@ -369,8 +369,9 @@ public function save() { $module_handler->invokeAll('field_update_forbid', array($this, $original, $has_data)); // Tell the storage engine to update the field by invoking the - // hook_field_storage_update_field(). Do this before saving the - // new definition since it still might fail. + // hook_field_storage_update_field(). The storage engine can reject the + // definition update as invalid by raising an exception, which stops + // execution before the definition is written to config. $module_handler->invoke($this->storage['module'], 'field_storage_update_field', array($this, $original, $has_data)); $hook = 'field_update_field';