diff -u b/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module --- b/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -319,7 +319,6 @@ 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, 'file' => 'taxonomy.pages.inc', - // Needed for menu_tail_load(). 'load arguments' => array('%map', '%index'), ); $items['admin/structure/taxonomy/%taxonomy_vocabulary_machine_name'] = array( diff -u b/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test --- b/modules/taxonomy/taxonomy.test +++ b/modules/taxonomy/taxonomy.test @@ -605,19 +605,26 @@ function testTermAutocompletion() { $base = $this->randomName(2); // Add a term with a slash in the name. - $term = $this->createTerm($this->vocabulary); - $term->name = $base . '/' . $this->randomName(); - taxonomy_term_save($term); - // Add a term with a slash in the name. - $term = $this->createTerm($this->vocabulary); - $term->name = $base . '/' . $this->randomName(); - taxonomy_term_save($term); + $first_term = $this->createTerm($this->vocabulary); + $first_term->name = $base . '/' . $this->randomName(); + taxonomy_term_save($first_term); + // Add another term that matches the first through the slash character. + $search_term = $this->createTerm($this->vocabulary); + $search_term->name = $base . '/' . $this->randomName(); + taxonomy_term_save($search_term); - // Try to autocomplete the term name, that contains a slash. + // Try to autocomplete a term name that contains a slash. // We should only get a single term returned. - $input = substr($term->name, 0, 5); - $this->drupalGet('taxonomy/autocomplete/taxonomy_' . $this->vocabulary->machine_name . '/' . $input); - $this->assertRaw(drupal_json_encode(array($term->name => check_plain($term->name))), t('Autocomplete returns term %term_name after typing the first 4 letters, including a slash in the name.', array('%term_name' => $term->name))); + $input = substr($search_term->name, 0, 5); + $url = 'taxonomy/autocomplete/taxonomy_'; + $url .= $this->vocabulary->machine_name . '/' . $input; + $this->drupalGet($url); + $target = array($search_term->name => check_plain($search_term->name)); + $message = t( + 'Autocomplete returns term %term_name after typing the first 4 letters, including a slash in the name.', + array('%term_name' => $search_term->name) + ); + $this->assertRaw(drupal_json_encode($target), $message); } /**