CRITICAL: module enabling all your inactive modules breaking completely the website

sirkitree - November 26, 2008 - 20:27
Project:SimpleTest automator
Version:6.x-1.0-beta2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs work
Description

I can install this module fine on my dev environment... however anytime I go to configure the darn thing it is somehow enabling a crapload of my modules that I do not want enabled. Note that it is enabling them, not installing them, therefore I get all kinds of "{table} doesn't exists" errors. Very infuriating and not usable. I've put all the necessary settings.php logic that simpletest and simpletest automator tells me to do. Have I done something wrong?

Setting as critical because at this point it is not usable.

#1

ryan_courtnage - January 8, 2009 - 19:13

I can duplicated this with the DRUPAL-6--1 branch. Fortunately i had a database backup.

All the modules are enabled with the following call on line 405 of simpletest_automator.module:

<?php
module_enable
(array_keys(module_rebuild_cache()));
?>

#2

kenorb - July 10, 2009 - 13:22

I've got the same problem.
It enabled my all modules which were disabled, even those which were invalid causing WSOD and breaking the website.
Tested with latest dev.
Fortunately I had a database backup as well.

#3

kenorb - July 10, 2009 - 13:28
Title:Installs modules?» CRITICAL: module enabling all your inactive modules breaking completely the website

#4

kenorb - July 10, 2009 - 13:33
Status:active» needs review

Removing this line helps.

AttachmentSize
simpletest_automator.patch 490 bytes

#5

cwgordon7 - July 11, 2009 - 04:03
Status:needs review» needs work

Hm, we need to enable the modules to get their permissions I guess... but perhaps we've forgotten to disable them afterwards? I don't think removing that line is the solution.

#6

kenorb - July 11, 2009 - 12:18

1. Why not to invoke hook_perm from all active modules?
2. Or drupal_get_form of permission table (user_admin_perm)?
3. Or to read permission list from permission table based on specified roles which can be changed of course.
4. Or something similar to user_admin_perm()

<?php
 
foreach (module_list(FALSE, FALSE, TRUE) as $module) {
    if (
$permissions = module_invoke($module, 'perm')) {
     
$form['permission'][] = array(
       
'#value' => $module,
      );
...
?>

Because nobody want to test some permission from inactive module.

#7

cwgordon7 - July 11, 2009 - 19:10

Right, but modules may have been enabled for SimpleTest automator that currently are not enabled on the site, so we're going to need to do some trickery here, I believe. I need to look more closely at the code.

 
 

Drupal is a registered trademark of Dries Buytaert.