diff --git a/core/modules/field_ui/src/FieldOverview.php b/core/modules/field_ui/src/FieldOverview.php index 86db19f..c780936 100644 --- a/core/modules/field_ui/src/FieldOverview.php +++ b/core/modules/field_ui/src/FieldOverview.php @@ -505,7 +505,7 @@ protected function getExistingFieldStorageOptions() { && !$field_storage->isLocked() && empty($field_types[$field_type]['no_ui']) && !in_array($this->bundle, $field_storage->getBundles(), TRUE)) { - $options[$field_storage->getName()] = array( + $options[$field_name] = array( 'type' => $field_type, 'type_label' => $field_types[$field_type]['label'], 'field' => $field_name, diff --git a/core/modules/hal/src/Tests/NormalizerTestBase.php b/core/modules/hal/src/Tests/NormalizerTestBase.php index 621ce33..58852ac 100644 --- a/core/modules/hal/src/Tests/NormalizerTestBase.php +++ b/core/modules/hal/src/Tests/NormalizerTestBase.php @@ -64,9 +64,11 @@ protected function setUp() { $this->installSchema('system', array('url_alias', 'router')); $this->installEntitySchema('user'); $this->installEntitySchema('entity_test'); - // If the test installs the Node module we need to install the node entity - // schema. This is because the Node module provides a body field storage - // that would cause tables to be created before the entity tables. + // If the concrete test sub-class installs node.module, ensure that the node + // entity schema is created before the field configurations are installed, + // because the node entity tables need to be created before the body field + // storage tables. This prevents trying to create the body field tables + // twice. $class = get_class($this); while ($class) { if (property_exists($class, 'modules')) { diff --git a/core/modules/system/src/Tests/Entity/EntityUnitTestBase.php b/core/modules/system/src/Tests/Entity/EntityUnitTestBase.php index cc3150a..d2dc925 100644 --- a/core/modules/system/src/Tests/Entity/EntityUnitTestBase.php +++ b/core/modules/system/src/Tests/Entity/EntityUnitTestBase.php @@ -47,9 +47,11 @@ protected function setUp() { $this->installEntitySchema('user'); $this->installEntitySchema('entity_test'); - // If the test installs the Node module we need to install the node entity - // schema. This is because the Node module provides a body field storage - // that would cause tables to be created before the entity tables. + // If the concrete test sub-class installs node.module, ensure that the node + // entity schema is created before the field configurations are installed, + // because the node entity tables need to be created before the body field + // storage tables. This prevents trying to create the body field tables + // twice. $class = get_class($this); while ($class) { if (property_exists($class, 'modules')) {