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.
Revealed via #1361232: Make the taxonomy entities classed objects
http://api.drupal.org/api/drupal/core--modules--forum--forum.module/func...
cannot work, because an TaxonomyTerm entity is passed into the hook, not a $tid.
Tasks:
- Change the argument to $term.
- For D8, add TaxonomyTerm type-hinting for $term.
- Add a test to Forum module, as this seems to be completely untested.
- Backport to D7.
Comment | File | Size | Author |
---|---|---|---|
#8 | forum_taxonomy_term_delete_broken-1401496-d7-8.patch | 1.72 KB | Albert Volkman |
#1 | 1401496.patch | 1.77 KB | bleen |
Comments
Comment #1
bleen CreditAttribution: bleen commentedI think this should do it...
Comment #2
xjmLooks like the patch includes a test.
Comment #3
fago#1: 1401496.patch queued for re-testing.
Comment #4
fagoI gave the patch a test - it works, code looks good and comes with a test. -> RTBC
Comment #5
catchLooks good. Committed/pushed to 8.x, moving to 7.x for backport.
Comment #6
sunThe stdClass type-hinting was bogus here. No need to fix in D8, since #1361232: Make the taxonomy entities classed objects will touch it either way.
However, should be removed for the D7 backport.
Comment #7
bleen CreditAttribution: bleen commentedsun ... just curious why I shouldn't have used type-hinting here?
Comment #8
Albert Volkman CreditAttribution: Albert Volkman commentedD7 backport without type-hinting.
Comment #9
xjmThe backport looks correct. Thanks @Albert Volkman!
Comment #10
webchickCommitted and pushed to 7.x. Thanks!