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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Needs review
FileSize
727 bytes

Well the good news is that there were only two variables to uninstall. :)

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

One day we will have automatic variable cleanup. Until then, RTBC.

Dries’s picture

Maybe we should just do DELETE FROM variable WHERE name LIKE '$module_%'; and simplify this a great deal?

moshe weitzman’s picture

You 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.

apaderno’s picture

Title: Unintall taxonomy module variables » Uninstall taxonomy.module variables
Dave Reid’s picture

Title: Uninstall taxonomy.module variables » Uninstall taxonomy module variables

@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.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Oopsie. Thanks, committed to HEAD. :)

I agree that #145164 would be my dream solution to both this and other problems with the whole variable situation.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.