1

I checked some modules implementing an input filter, and (if not in few occasions) I have never seen the modules removing the module_name_$format Drupal persistent variables when they are uninstalled.

Since a module should normally delete its Drupal persistent variables when it is uninstalled, is there a reason why an input filter module doesn't normally delete its own Drupal variables, for example because this is already done by Drupal?

1 Answer 1

2

A module should be responsible for cleaning up after itself when it is uninstalled. There is no reason not to do this, unless some other modules depend on those variables but I very much doubt this is a case. If they depend on a module they probably depend on the entire module, not just some variables defined by it.

I, for example, use htmLawed and out of curiosity checked the .install file; it does clean the variables defined in the format "module_name_format_%".

As a best practice you should drop all the tables and delete the variables defined by your module, doing this by implementing hook_uninstall in your .install file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.