Closed (fixed)
Project:
Menu clone
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
5 Aug 2010 at 03:17 UTC
Updated:
6 Oct 2010 at 18:00 UTC
Jump to comment: Most recent file
Fatal error: Maximum execution time of 1000 seconds exceeded in /var/www/dev.aboutgiving.net/public_html/sites/all/modules/menu_clone/menu_clone.module on line 100
While trying to clone a menu.
Sounds like it is stuck in this loop:
..
while(!empty($result)) {
$new_name = substr('clone' . $i . '-' . $menu['menu_name'], 0, MENU_MAX_MENU_NAME_LENGTH_UI);
$result = db_result(db_query($sql, 'menu-' . $new_name));
}
..
I'm not sure why hook_load is used (menu_clone_load)? Isn't this function called every time node_load is called? I am not sure what that has to do with a menu clone process, but maybe I am missing something..
Jason
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | bug infinite loop.patch | 457 bytes | adrianpintilie |
Comments
Comment #1
jason.fisher commentedThis only happens on one specific menu that I have..
Comment #2
jason.fisher commentedI think it has something to do with MENU_MAX_MENU_NAME_LENGTH_UI + 'menu-' being greater than the largest possible menu machinekey?
If I use "MENU_MAX_MENU_NAME_LENGTH_UI-1" -- i.e. change this portion of the code to (left my debug deadwood):
Then everything seems to work fine. You are doing a substr() for a specific length and then prefixing it with 'menu-' .. could that be it?
Comment #3
adrianpintilie commentedthe code is incorrect here. The loop occurs when you try to clone a menu that you cloned before and you used the generated naming convention.
you need
in the loop. I have attached a patch.
Comment #4
malc0mn commentedWhoa, what a stupid one! Thanks adrianpintilie!
Patch committed and beta4 release is available.