diff --git a/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php b/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php index 512b0fd..103156b 100644 --- a/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php +++ b/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php @@ -233,14 +233,16 @@ function testSiteWideContact() { $this->clickLink(t('Manage fields'), $i); $this->assertResponse(200); + $this->clickLink(t('Add field')); + // Create a simple textfield. $edit = array( 'add_new_field[label]' => $field_label = $this->randomName(), 'add_new_field[field_name]' => Unicode::strtolower($this->randomName()), 'add_new_field[type]' => 'text', ); - $field_name = 'field_' . $edit['fields[_add_new_field][field_name]']; - $this->drupalPost(NULL, $edit, t('Save field settings')); + $field_name = 'field_' . $edit['add_new_field[field_name]']; + $this->drupalPost('admin/structure/contact/manage/' . $category . 'add-field', $edit, t('Save field settings')); $this->drupalPost(NULL, array(), t('Save field settings')); $this->drupalPost(NULL, array(), t('Save settings')); 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 d0e4470..51beb39 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php @@ -125,7 +125,7 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL, $form['inline_actions']['add'] = array( '#theme' => 'menu_local_action', '#link' => array( - 'href' => 'admin/structure/types/manage/' . $this->bundle . '/add-field', + 'href' => $this->adminPath . '/add-field', 'title' => t('Add field'), ), );