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.
Comments
Comment #1
kbrinnerI have created a patch for this so Taxonomy Menu is more specific when checking variables for deletion upon uninstalling the module. This prevents variables associated with the Taxonomy Menu Block from being deleted along with the Taxonomy Menu variables.
With the applied patch, the uninstall function is now:
Comment #2
jenlamptonLooks great, nice catch, nice clean fix. Thank you @kbrinner
Comment #3
jenlamptonBack to NR, since it looks like we missed a few variables. New patch attached. (I also added a db_like condition to the query, hoping to save us some time in that loop during uninstall)
Comment #5
jenlamptonfunny, this shouldn't affect tests. trying again.
Comment #6
andrey.troeglazov commentedComment #7
andrey.troeglazov commentedRelaunched tests.
Comment #8
andrey.troeglazov commentedComment #9
andrey.troeglazov commentedNow patch looks ok and tests passed.
Comment #11
andrey.troeglazov commented