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.

AttachmentSizeStatusTest resultOperations
menu_rebuild_fix.patch0 bytesIgnoredNoneNone

#1

chx - May 21, 2008 - 16:29
AttachmentSizeStatusTest resultOperations
menu_rebuild_fix.patch534 bytesIgnoredNoneNone

#2

moshe weitzman - May 22, 2008 - 15:18
Status:needs review» reviewed & tested by the community

looks good to me, and auto-recovers when you get into a nasty situation of your site going permanent WSOD.

#3

chx - May 23, 2008 - 08:58

For D6 too.

#4

Gábor Hojtsy - May 23, 2008 - 18:41

Why should this happen in the middle of an API function?

#5

chx - May 24, 2008 - 04:43

'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

pwolanin - June 16, 2008 - 14:07

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

pwolanin - July 8, 2008 - 20:44
Status:reviewed & tested by the community» needs review

how about this? A quick test shows it works if the masks are deleted/emptied.

AttachmentSizeStatusTest resultOperations
mask-recovery-261148-7.patch887 bytesIgnoredNoneNone

#8

alexanderpas - September 14, 2008 - 22:22

+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

chx - September 15, 2008 - 03:12

so how do we proceed?

#10

alexanderpas - September 15, 2008 - 07:16

how about RTBC on the #1 patch?

#11

robertDouglass - September 20, 2008 - 06:13

I've been bitten by this bug. Subscribe. Will review.

#12

webchick - September 20, 2008 - 21:10

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

alexanderpas - September 20, 2008 - 21:22

webchick, did applying #1 fixed it for you?

#14

dropcube - September 20, 2008 - 22:43

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

catch - September 20, 2008 - 23:15

I've had this on occasion but not been able to consistently reproduce.

#16

chx - September 21, 2008 - 17:01

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

pwolanin - September 22, 2008 - 00:34

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

pwolanin - September 22, 2008 - 00:44

some of the D7 problems may be fixed by this: http://drupal.org/node/238760#comment-1023094

#19

alexanderpas - September 23, 2008 - 03:37

chx: see #307937: MYSQL Syntax error on installation with pre-filled tables for a way to forcefully reproduce this bug...

#20

dropcube - September 25, 2008 - 16:49

@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

pwolanin - October 5, 2008 - 19:29

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.

AttachmentSizeStatusTest resultOperations
first-rebuild-261148-6x-21.patch663 bytesIgnoredNoneNone

#22

chx - October 5, 2008 - 19:32
Status:needs review» reviewed & tested by the community

Masterstroke.

#23

pwolanin - October 6, 2008 - 14:04
Assigned to:chx» pwolanin

with added code comment

AttachmentSizeStatusTest resultOperations
first-rebuild-261148-6x-23.patch839 bytesIgnoredNoneNone

#24

alexanderpas - October 6, 2008 - 21:43

even better!

#25

alexanderpas - October 7, 2008 - 10:02

#26

webchick - October 8, 2008 - 01:43
Version:7.x-dev» 6.x-dev

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

Gábor Hojtsy - October 8, 2008 - 12:34
Status:reviewed & tested by the community» fixed

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

Anonymous (not verified) - October 22, 2008 - 12:35
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#29

Yura Filimonov - December 31, 2008 - 09:06

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.

 
 

Drupal is a registered trademark of Dries Buytaert.