I'm a newbie but I know what irritates me, and I think this will irritate other newbies as well.
I go to try out Drupal, find out what it's all about. I install and try ot enable all sorts of interesting modules. It turns out some of them are os broken that they mess up the entire installation. Never mind which modules. That's not the point.
Now, how to back out of the bad modules? I can't use the admin menu because the entire installation's hosed. I try deleting the module on the server. This kind of works but there's a stiff price. The site now loads EXTEMELY slowly. Kind of takes the fun out of exploring.
Here's what I did. Maybe it's a good idea, maybe not. You tell me:
includes/bootstrap.inc:
function drupal_load($type, $name) {
static $files = array();
if (isset($files[$type][$name])) {
return TRUE;
}
$filename = drupal_get_filename($type, $name);
//if ($filename) {
if ($filename and file_exists($filename)) { //Patch Rowland - make more robust
include_once "./$filename";
$files[$type][$name] = TRUE;
return TRUE;
}
return FALSE;
}
All I know is it seems to solve my immediate problem. If there are repercussions they haven't hit me yet
Comments
Comment #1
wim leersWhile this is easier than settings the status field of the appropriate row in the system table to zero, it doesn't really disable the module. Next time the module will be there, it will be loaded again and so will be the WSOD. You could of course add a query to disable the module as I've just described as well. The difference in performance should be negligible.
The downside is that this is actually a bad habit, you should first disable the module in the DB, then run the uninstall function for the module (if it's available).
Comment #2
mr.baileysCleaning up the issue queue. In addition to Wim Leers' explanation, also see "Help! I enabled a buggy module and now I can't disable it!"