hook_uninstall is too general

Created on 10 April 2013, over 11 years ago
Updated 17 October 2024, about 1 month ago

Hello,

I am the maintainer of Taxonomy menu block, a module that does the same as this one but has a completely different approach.

I have noticed that when uninstalling Taxonomy menu, this code gets run in hook_uninstall:

// Delete variables
  $query = db_select('variable', 'v')->fields('v')->execute();
  $variables = $query->fetchAll();
  foreach ($variables as $variable) {
    if (strpos($variable->name, 'taxonomy_menu') !== FALSE) {
      variable_del($variable->name);
    }
  }

This uninstalls all variables that are named taxonomy_menu%, meaning also the variables for my module. There should be done a more specific deletion of variables.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

No activities found.

Production build 0.71.5 2024