Taxonomy manager should fire hook_entity_delete when deleting terms

Created on 16 January 2014, over 11 years ago
Updated 27 June 2025, about 2 months ago

As in all base entity modules, this module should also fire hook_entity_delete when deleting terms.

Here is an example in taxonomy_term_delete() on taxonomy.module:

...

if ($term = taxonomy_term_load($tid)) {
  db_delete('taxonomy_term_data')->condition('tid', $tid)->execute();
  db_delete('taxonomy_term_hierarchy')->condition('tid', $tid)->execute();

  field_attach_delete('taxonomy_term', $term);
  module_invoke_all('taxonomy_term_delete', $term);
  module_invoke_all('entity_delete', $term, 'taxonomy_term'); // HERE IS WHAT THIS MODULE IS MISSING.
  taxonomy_terms_static_reset();
}

...
📌 Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇧🇷Brazil halth Brazil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024