diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 7fc1578b006..09b67ecc597 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -310,7 +310,9 @@ function taxonomy_menu() { $items['taxonomy/term/%taxonomy_term/edit'] = array( 'title' => 'Edit', 'page callback' => 'drupal_get_form', - 'page arguments' => array('taxonomy_form_term', 2), + // Pass a NULL argument to ensure that additional path components are not + // passed to taxonomy_form_term() as the vocabulary machine name argument. + 'page arguments' => array('taxonomy_form_term', 2, NULL), 'access callback' => 'taxonomy_term_edit_access', 'access arguments' => array(2), 'type' => MENU_LOCAL_TASK, diff --git a/core/modules/taxonomy/taxonomy.test b/core/modules/taxonomy/taxonomy.test index 23ce3482ac6..31b63942652 100644 --- a/core/modules/taxonomy/taxonomy.test +++ b/core/modules/taxonomy/taxonomy.test @@ -703,6 +703,10 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { // Check that the term feed page is working. $this->drupalGet('taxonomy/term/' . $term->tid . '/feed'); + // Check that the term edit page does not try to interpret additional path + // components as arguments for taxonomy_form_term(). + $this->drupalGet('taxonomy/term/' . $term->tid . '/edit/' . $this->randomName()); + // Delete the term. $this->drupalPost('taxonomy/term/' . $term->tid . '/edit', array(), t('Delete')); $this->drupalPost(NULL, NULL, t('Delete'));