Menu first rebuild does not happen
chx - May 21, 2008 - 16:28
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | menu system |
| Category: | bug report |
| Priority: | critical |
| Assigned: | pwolanin |
| Status: | closed |
Description
I haev seen too many requests to this and now it came to me that there is a way to rebuild without running a query to see whether router is empty.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| menu_rebuild_fix.patch | 0 bytes | Ignored | None | None |

#1
#2
looks good to me, and auto-recovers when you get into a nasty situation of your site going permanent WSOD.
#3
For D6 too.
#4
Why should this happen in the middle of an API function?
#5
'Cos if the menu build does not happen (or fail) then your masks will be empty -- and this is the only case when your masks can be empty -- so it's a good time and time place to try to recover.
#6
As an alternative, can we set the variable that says a rebuild is needed and maybe hard code a few masks in for this just this page request?
#7
how about this? A quick test shows it works if the masks are deleted/emptied.
#8
+1 to #1 nice patch, also fixes #307937: MYSQL Syntax error on installation with pre-filled tables
-1 to #7, that just looks ugly...
#9
so how do we proceed?
#10
how about RTBC on the #1 patch?
#11
I've been bitten by this bug. Subscribe. Will review.
#12
I can't currently install D7 because of this, which is seriously impeding my ability to commit patches. ;) It'd be nice of chx/pwolanin could have a discussion about the best way to proceed.
#13
webchick, did applying #1 fixed it for you?
#14
It's happening for me every time I try to install D7 after the DBTNG patch. Would be good to find what is causing the issue, for what reason the menu rebuild does not happen during a fresh installation. Subscribing.
#15
I've had this on occasion but not been able to consistently reproduce.
#16
Give me file level access to some place where I can reproduce something and I will figure out. I can't help a bug I can't see.
#17
People have seen this on D6 and D7, so it's some kind of race condition I think. But I'm at a loss as to what.
Actually, the D7 code has a flaw that's partly fixable... let me go find it.
#18
some of the D7 problems may be fixed by this: http://drupal.org/node/238760#comment-1023094
#19
chx: see #307937: MYSQL Syntax error on installation with pre-filled tables for a way to forcefully reproduce this bug...
#20
@alexanderpas: I can not reproduce the bug with the instrucctions there, the first step is "instal site normally", how is that if I can not even install Drupal. The error appeared during the installation process.
#21
I think this is a simpler way to achieve what chx's patch does in #1. With this patch in place, I can variable_del the menu masks via a PHP node and life goes on normally. Without the patch, Drupal dies until I hit update.php or otherwise manually force a menu rebuild.
Patch is against 6.x, though applies to 7.x also with offset.
#22
Masterstroke.
#23
with added code comment
#24
even better!
#25
marked #280015: cannot install drupal - menu_router error as duplicate.
#26
Ok, I committed this. I've run into this bug before, and it's good to have a fix in. However, I'd LOVE to figure out WHY this happens so we can fix the underlying issue. Talking to Peter and chx though it doesn't sound like it's so easy to determine since it's very erratic.
Moving down to 6.x for consideration.
#27
Seconded webchick's comment on the fact that it would be better to know the underlying cause. Committed to 6.x now as a stop-gap solution.
#28
Automatically closed -- issue fixed for two weeks with no activity.
#29
Since you have marked #307937 as a duplicate of this issue, I'll let you know that:
- I have tried installing Drupal 6.6, downloaded recently on WAMP 2.0c
- during the installation, I get the MySQL syntax error described in #307937
- if the installation is successful (happened once), after the site times out on anything, the menu isn't completely built
My cookies are enabled and PHP memory limit is set to 128Mb.
Anyone confirmed that the problem is completely fixed? Judging by posts elsewhere, it is not.
Thanks.
#30
See:
#2946: no warning is issued if cookies are not enabled
#234539: Critical SQL error in installer with {menu_router}