A problem with the yet unreleased versions of Drupal 6 is that in some cases Drupal all of a sudden seems to lose all of its paths. In my case it happened when working on a port of an OSInet module from the Drupal 4.7 to Drupal 6 API.
A symptom of the problem can be seen by checking the menu_router table and finding it to be empty, although it should contain the default site navigation.
Before reinstalling, a
quick hack/fix can return the site to a better behaviour: since Drupal knows how to install itself, how about asking it to regenerate the menu_router table ? Luckily, there's a function which does just that: menu_rebuild.
So just edit index.php at the root of your Drupal install, just like this:
<?php
// [...]
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
menu_rebuild(); // use just once
die(); // use just once
$return = menu_execute_active_handler();
// [...]
?>Now invoke any page on the site, just once, then remove the two added lines, and your menu should return to normal.



saved my day! thx!
This advice was a lifesaver
Good one!
Thanks for this one, that really helped my - and you might guess I'm not a php expert :)
have you found why this happens?
Hi. Before finding your method my way was to copy
menu_routercontent again. Have you found the reason the table is emptied? On my local machine the module I am writing works fine. On the production machine it just empties the table... I am puzzled.Thanks
No problem with non-beta D6
I haven't seen this problem since D6 went out of beta. I expect you'll have some debugging to do :-)
I just got this error in drupal 6.1
It happened when I tried to write a code to add an action and enabled my module for the 1st time
I cannot see any connection between this and my code I actually just contained empty functions and hooks
This is not the 1st time I got this, last time I recovered from my nightly backup and lost the accesslog, watchdog and some cache I am not backing up nightly
I think this is a critical issue, I'll do my best to investigate it anyway your tip saved me! 10x!
Critical issues should go in the issue queue
Thanks for your comment. However, if you can find how to reproduce the problem in a current release like 6.1, you should really create an issue on d.o. about it, so a fix can be worked on.
Thanks so much for this. I
Thanks so much for this. I had the same problem with Drupal 6.1 when uploading the Views Module. It just killed the site and I had no idea how to get it back up. I deleted the module and then followed your instructions and it brought the site back online. Thanks again!!!
thank you thank you thank
thank you thank you thank you thank you
I was configuring Drupal 6
I was configuring Drupal 6 last night and was stopped dead in my tracks by this issue. I was this close to re-installing Drupal when I stumbled upon your blog post. THANK YOU!
Thanks
thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks
You saved my day either :-)
I also had this issue when
I also had this issue when installing the Views module, version 6.x-2.0-beta3.
Hopefully it gets fixed before it's out of beta!
-Jim
Views issue
Hi Jim,
In that case, make sure you report the problem to the Views issue queue. The Views maintainer will likely never see it if you only mention here.
Here is the submission form for Views issue:
http://drupal.org/node/add/project_issue/views/bug
Damn thanks so much! I was
Damn thanks so much! I was pretty worried for a sec.
I just about had a heart
I just about had a heart attack...
You are a God.