Error

When trying to uninstall the disabled SimpleTest module the execution of
/admin/modules/uninstall/confirm for SimpleTest causes the error below:

Fatal error: Call to undefined function simpletest_clean_environment() 
in /***/sites/all/modules/contrib/simpletest/simpletest.install on line 170

Environment

Drupal 7.14

Comments

Refineo’s picture

When simpletest module is already disabled it is not possible to uninstall it because simpletest.install cannot find simpletest_clean_environment() that is defined in the simpletest.module.

Refineo’s picture

Status: Active » Closed (fixed)

Issue solved. I enabled the simpletest 2 again in a second window and then unistalled using the previous unistall window.

Refineo’s picture

Issue solved. I enabled the simpletest 2 again in a second window and then unistalled using the previous unistall window.

seemas’s picture

Issue summary: View changes

worked when added module_load_include() to initiate a module file:

 @@ -167,6 +167,7 @@
  * Implements hook_uninstall().
  */
 function simpletest_uninstall() {
+  module_load_include('module', 'simpletest');
   simpletest_clean_environment();
 
   // Remove settings variables.

Suggestion from hook_uninstall() documentation page was not to use functions from .module:
https://api.drupal.org/comment/15344#comment-15344