Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Now that the taxonomy module can be uninstalled (#360104: Allow taxonomy to be uninstalled - move install/uninstall from system.install to taxonomy.install), we need to make sure all taxonomy module variables are uninstalled as well.
Comment | File | Size | Author |
---|---|---|---|
#1 | 361135-taxonomy-uninstall-variables-D7.patch | 727 bytes | Dave Reid |
Comments
Comment #1
Dave ReidWell the good news is that there were only two variables to uninstall. :)
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedOne day we will have automatic variable cleanup. Until then, RTBC.
Comment #3
Dries CreditAttribution: Dries commentedMaybe we should just do
DELETE FROM variable WHERE name LIKE '$module_%';
and simplify this a great deal?Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedYou mean that core should do that? We have namespace problems. This would wipe variables from taxonomy_dhtml module, for example. Granted that module depends on taxonomy so my example isn't a problem in practice, but i'll bet that there are counter examples.
Unfortunately, the patch containing the proper fix for this is stalled #145164: DX: Use hook_variable_info to declare variables and defaults. Maybe it tried to do too much.
Comment #5
apadernoComment #6
Dave Reid@Dries: The approach in #145164: DX: Use hook_variable_info to declare variables and defaults would be ideal (I actually backport an implementation of it in most of my contrib modules and it works great), but if there were some person that wrote a taxonomy_alternate.module, we'd have the possibility of unwanted variable loss. Now, if for some reason there was a module column in the variable table, we could easily do a
DELETE FROM {variable} WHERE module = '$module'
, but that's probably left better for a separate issue.Comment #7
webchickOopsie. Thanks, committed to HEAD. :)
I agree that #145164 would be my dream solution to both this and other problems with the whole variable situation.