Drupal debug

Sometimes is very hard to debug Drupal when you get white screen of death
Very often some module is making the mess
To check which module is breaking the site
Open includes/module.inc and find function module_invoke_all
Add bolded line to the function to check which exactly module is breaking your site

 

function module_invoke_all($hook) {
$args = func_get_args();
// Remove $hook from the arguments.
unset($args[0]);
$return = array();
foreach (module_implements($hook) as $module) {
$function = $module . ‘_’ . $hook;

print „Starting loading $module <br />“;

if (function_exists($function)) {
$result = call_user_func_array($function, $args);
if (isset($result) && is_array($result)) {
$return = array_merge_recursive($return, $result);
}
elseif (isset($result)) {
$return[] = $result;
}
}

print „Finished loading $module <br />“;

}

return $return;
}

If you need to disable module you can make it with phpmyadmin
UPDATE system SET status=’0′ WHERE name=’module_name’;
After this you need to clean cache
DELETE FROM cache_bootstrap WHERE cid=’system_list’;

 

С етикет: ,
Публикувано в Без категория

Вашият коментар

Вашият имейл адрес няма да бъде публикуван.

*