diff --git a/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php index ac53e2e3e1c673cf206d13c14ffe445c37ce9e37..44e4be7119c56f1b3d466549b0da60f01f179137 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php @@ -132,7 +132,7 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL, ), 'widget_type' => array( '#type' => 'link', - '#title' => $widget_configuration ? $widget_types[$widget_configuration['type']]['label'] : $widget_types['hiden']['label'], + '#title' => $widget_configuration ? $widget_types[$widget_configuration['type']]['label'] : $widget_types['hidden']['label'], '#href' => $admin_field_path . '/widget-type', '#options' => array('attributes' => array('title' => t('Change widget type.'))), ), diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php index 582e47847fc317eee60724ff643cbcdd3c35f70b..5b84d0e53f05644db1551688c4295975fb11239f 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php @@ -422,6 +422,15 @@ function testHiddenFields() { $bundle_path = 'admin/structure/types/manage/article/fields/'; $this->drupalGet($bundle_path); $this->assertFalse($this->xpath('//select[@id="edit-add-existing-field-field-name"]//option[@value=:field_name]', array(':field_name' => $field_name)), "The 're-use existing field' select respects field types 'no_ui' property."); + + // Remove the form display component to check the fallback label. + entity_get_form_display('node', $this->type, 'default') + ->removeComponent($field_name) + ->save(); + + $this->drupalGet('admin/structure/types/manage/' . $this->type . '/fields/'); + $this->assertLinkByHref(url('admin/structure/types/manage/' . $this->type . '/fields/node.' . $this->type . '.' . $field_name . '/widget-type')); + $this->assertLink('- Hidden -'); } /**