Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
in function taxonomy_overview_terms(), around line 383 currently reads:
$form[$key]['view'] = array('#value' => l($term->name, "taxonomy/term/$term->tid"));
when it should read:
$form[$key]['view'] = array('#value' => l($term->name, taxonomy_term_path($term)));
Why does it matter? Some modules override the list of terms found: admin/content/taxonomy/% with their own path using the hook_term_path() function.
The patch is attached. I see the issue in d7 too.
Comment | File | Size | Author |
---|---|---|---|
#14 | taxonomy-path-928188-15.patch | 858 bytes | marvin_B8 |
#12 | 928188-11.patch | 745 bytes | marvin_B8 |
#8 | taxonomy.admin_.inc_.patch | 897 bytes | elvis2 |
#6 | taxonomy.admin_.inc_.patch | 925 bytes | elvis2 |
#4 | 928188.patch | 1.33 KB | swentel |
Comments
Comment #1
elvis2 CreditAttribution: elvis2 commentedI changed the version to d7.x since the bug is there too.
Comment #2
elvis2 CreditAttribution: elvis2 commentedNow with patch...
Comment #4
swentel CreditAttribution: swentel commentedPatch should be taken from drupal root and against HEAD. Code is very different with that of D6. New patch.
Comment #6
elvis2 CreditAttribution: elvis2 commentedOk, new patch, from d7 head.
Comment #8
elvis2 CreditAttribution: elvis2 commentedI first line in previous patch was failing simpletest. Let's try again.
Comment #9
catchtaxonomy_term_path() doesn't exist in D7, you can use entity_uri() though.
Comment #10
elvis2 CreditAttribution: elvis2 commentedThanks catch, I will look into it.
Comment #12
marvin_B8 CreditAttribution: marvin_B8 commentedPatch with entity_uri() but looks like a hack
Comment #14
marvin_B8 CreditAttribution: marvin_B8 commentedComment #15
elvis2 CreditAttribution: elvis2 commented@marvin_B8, thanks for working on this.
Comment #16
David_Rothstein CreditAttribution: David_Rothstein commentedtaxonomy_term_uri() hardcodes the path also, so this patch doesn't fix the issue. It would indeed need to use entity_uri().
That approach sounds correct to me, but someone should probably check this with the Forum module to see if it actually makes sense. (Since Forum is an example of a module that actually does alter the term path for terms that represent forums, but it may not always make sense to redirect to the actual forum page from all admin pages; maybe this one is sensible though.)