diff --git a/core/modules/field/src/Entity/FieldConfig.php b/core/modules/field/src/Entity/FieldConfig.php index 70b03b6..87f4400 100644 --- a/core/modules/field/src/Entity/FieldConfig.php +++ b/core/modules/field/src/Entity/FieldConfig.php @@ -215,8 +215,8 @@ public static function postDelete(EntityStorageInterface $storage, array $fields return; } - // Delete field storages that have no more fields if the field storage is - // deletable. + // Delete the associated field storages if they are not used anymore and are + // not persistent. $storages_to_delete = array(); foreach ($fields as $field) { $storage_definition = $field->getFieldStorageDefinition(); diff --git a/core/modules/field/src/Entity/FieldStorageConfig.php b/core/modules/field/src/Entity/FieldStorageConfig.php index a889bb7..6b89e38 100644 --- a/core/modules/field/src/Entity/FieldStorageConfig.php +++ b/core/modules/field/src/Entity/FieldStorageConfig.php @@ -136,12 +136,13 @@ class FieldStorageConfig extends ConfigEntityBase implements FieldStorageConfigI /** * Flag indicating whether the field storage should be deleted when orphaned. * - * By default field storages are removed when there are no remaining fields - * using them. If multiple modules provide bundles which need to use the same - * field storage then setting this to TRUE will preserve the field storage - * regardless of what happens to the bundles. The classic use case for this - * is node body field storage since Book, Forum, the Standard profile and - * bundle (node type) creation through the UI all use same field storage. + * By default field storages for configurable fields are removed when there + * are no remaining fields using them. If multiple modules provide bundles + * which need to use the same field storage then setting this to TRUE will + * preserve the field storage regardless of what happens to the bundles. The + * classic use case for this is node body field storage since Book, Forum, the + * Standard profile and bundle (node type) creation through the UI all use + * same field storage. * * @var bool */ diff --git a/core/modules/field_ui/src/FieldOverview.php b/core/modules/field_ui/src/FieldOverview.php index 3f11b4f..86db19f 100644 --- a/core/modules/field_ui/src/FieldOverview.php +++ b/core/modules/field_ui/src/FieldOverview.php @@ -225,9 +225,8 @@ public function buildForm(array $form, FormStateInterface $form_state, $entity_t // Build list of options. $existing_field_options = array(); foreach ($existing_fields as $field_name => $info) { - $text = $this->t('@type: @field (@label)', array( + $text = $this->t('@type: @field', array( '@type' => $info['type_label'], - '@label' => $info['label'], '@field' => $info['field'], )); $existing_field_options[$field_name] = Unicode::truncate($text, 80, FALSE, TRUE); @@ -495,11 +494,11 @@ protected function getExistingFieldStorageOptions() { $options = array(); // Load the field_storages and build the list of options. $field_types = $this->fieldTypeManager->getDefinitions(); - foreach ($this->entityManager->getFieldStorageDefinitions($this->entity_type) as $field_storage) { + foreach ($this->entityManager->getFieldStorageDefinitions($this->entity_type) as $field_name => $field_storage) { // Do not show: - // - non-configurable field storages. - // - locked field_storages. - // - field_storages that should not be added via user interface. + // - non-configurable field storages, + // - locked field_storages, + // - field_storages that should not be added via user interface, // - field_storages that already have a field in the bundle. $field_type = $field_storage->getType(); if ($field_storage instanceof FieldStorageConfigInterface @@ -509,8 +508,7 @@ protected function getExistingFieldStorageOptions() { $options[$field_storage->getName()] = array( 'type' => $field_type, 'type_label' => $field_types[$field_type]['label'], - 'field' => $field_storage->getName(), - 'label' => $field_storage->getLabel(), + 'field' => $field_name, ); } }