diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php index 99ab62ea53d..2195b55a3a6 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php @@ -348,11 +348,6 @@ class TermTest extends TaxonomyTestBase { // Check that the term feed page is working. $this->drupalGet('taxonomy/term/' . $term->id() . '/feed'); - // Check that the term edit page does not try to interpret additional path - // components as arguments for entity_get_form(). - $this->drupalGet('taxonomy/term/' . $term->id() . '/edit/' . $this->randomName()); - $this->assertResponse(200, 'The taxonomy term edit menu item ensured appropriate arguments were passed to its page callback.'); - // Delete the term. $this->drupalPost('taxonomy/term/' . $term->id() . '/edit', array(), t('Delete')); $this->drupalPost(NULL, NULL, t('Delete')); diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 2d08f286dc6..0ec318743ff 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -265,14 +265,11 @@ function taxonomy_menu() { ); $items['taxonomy/term/%taxonomy_term/edit'] = array( 'title' => 'Edit', - 'page callback' => 'entity_get_form', - 'page arguments' => array(2, 'default', array()), - 'access callback' => 'entity_page_access', - 'access arguments' => array(2, 'update'), + 'title callback' => 'taxonomy_term_title', + 'title arguments' => array(2), 'type' => MENU_LOCAL_TASK, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, 'weight' => 10, - 'file' => 'taxonomy.admin.inc', ); $items['taxonomy/term/%taxonomy_term/delete'] = array( 'title' => 'Delete', diff --git a/core/modules/taxonomy/taxonomy.routing.yml b/core/modules/taxonomy/taxonomy.routing.yml index d89019ef70d..474d48c01d4 100644 --- a/core/modules/taxonomy/taxonomy.routing.yml +++ b/core/modules/taxonomy/taxonomy.routing.yml @@ -12,6 +12,13 @@ taxonomy_term_add: requirements: _access_taxonomy_term_create: 'taxonomy_term' +taxonomy_term_edit: + pattern: '/taxonomy/term/{taxonomy_term}/edit' + defaults: + _entity_form: 'taxonomy_term.default' + requirements: + _entity_access: 'taxonomy_term.update' + taxonomy_term_delete: pattern: '/taxonomy/term/{taxonomy_term}/delete' defaults: