Last updated December 19, 2008. Created by fractile81 on May 26, 2008.
Edited by pwolanin, fxnut. Log in to edit this page.
If you're experiencing the "Page Not Found" error on every single page of your Drupal 6 site, it is possible that your menu router data got corrupted or deleted. This is most likely to happen when there is an error that occurs during the process of enabling a module. See this bug report: http://drupal.org/node/238760 The problem should be less likely to occur after the Drupal 6.3 update is out.
To fix this, your first step should be to try to figure out what might have caused it and to undo those last few modifications that you made to the site. Typically, this would involve reverting to old versions of modules, or even disabling all non-core modules. Since the site is not accessible, you may need to disable the modules by SQL. Set the status field of the suspect contributed module(s) to 0 in the {system} table. There are plenty of threads in the forum that discuss how to do this, if you are not familiar.
Once you've done that, you just need to rebuild your menu system to give you access again. The easiest way to do this is to run update.php. Even if there are no updates, running through the process will also rebuild the menu router.
If for some reason running update.php doesn't work, you may need to temporarily alter some code as outlined below. This should be a last resort, and is not normally needed.
To rebuild your menu, find the menu_execute_active_handler() function inside /includes/menu.inc (approx at line 334) and force it to call menu_rebuild().
I.e. temporarily change this:
if (variable_get('menu_rebuild_needed', FALSE)) {
menu_rebuild();
}to this:
//if (variable_get('menu_rebuild_needed', FALSE)) {
menu_rebuild();
//}Now if you try to access your site again, it will rebuild the menus and you should be back to normal.
IMPORTANT: Don't forget to undo your changes to menu.inc, otherwise your site will suffer a huge performance hit!
Comments
update.php did the trick
Running the update.php script resolved my "page not found" problem.
For me too
I was not able to see the Tagadelic settings page and any of its menu in admin. If I try to directly access it using admin/settings/tagadelic, it was showing "Page not found" error. By running update.php, the problem is resolved.
Thanks for the useful information
Update.php worked for me as
Update.php worked for me as well
GoDaddy Coupons - Save money on domains and web hosting
Glumbo Shopping - Compare prices for millions of products to get the lowest price
Life saver
Thaks for this. I was enabling Ubercart modules and when it was creating tables to the MySQL something went wrong.
Update.php gave: Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)
Rebuilding menus did the trick and everything is fine now.
Thanks a lot
Another cause
I figured out what was causing the problem for us. Basically, one of the client staff with editing permissions had edited a Menu Item path to an invalid path, and it apparently nuked the whole menu router system. I had to go into the database and find and delete the corrupted record manually, since we were locked out of everything, and not even using a PHP script to clear the caches and perform update.php could fix it! Once I deleted the corrupted record, then those things worked and the site is back up.
This is a serious vulnerability, potentially a security issue. I’ll submit it accordingly.
Editing menu.inc works on Drupal 7 too.
Editing menu.inc worked for me on Drupal 7.2, too. Lines are approximately around line 496.
Thanks lot for this....
Thanks lot for this....
Issues with drupal maintenance mode
I was really stuck until I found this post. Did not know what happened. Applied a drupal database update and the whole website went down. Could not access any login panel.
I did as suggested above and my website was up and going again.
Thanks ever so much
Hostgator support officially in my bad books