I am having an issue enabling admin menu and the toolbar.
On enabling, I get these errors,
Fatal error: Maximum function nesting level of '500' reached, aborting! in /includes/menu.inc on line 622 Call Stack: 0.0011 656504 1. {main}()
/docroot/index.php:0 2.8746 138818744 2. menu_execute_active_handler()
/docroot/index.php:21 3.8733 170061440 3. drupal_deliver_page()
/docroot/includes/menu.inc:531 3.8760 170101048 4. drupal_deliver_html_page()
/docroot/includes/common.inc:2471 3.8761 170102544 5. drupal_render_page()
/docroot/includes/common.inc:2583 4.8530 183770344 6. admin_menu_page_build()
/docroot/includes/common.inc:5616 4.8537 183777272 7. admin_menu_output()
/docroot/sites/all/modules/admin_menu/admin_menu.module:201 4.8541 183778936 8. admin_menu_tree()
/docroot/sites/all/modules/admin_menu/admin_menu.module:479 5.1610 200369480 9. admin_menu_merge_tree()
/docroot/sites/all/modules/admin_menu/admin_menu.inc:45 5.1610 200372552 10. admin_menu_merge_tree()
If I disable the nested call to admin_menu_merge_tree on line 239, the menu loads and it seems like it loads without any issues or missing items.
We have a TON of modules installed which may be an issue. We have never had the menu work in the past, so I haven't used it, but it seems like there is promise if disabling that one nested call allows the menu to load.
Any recommendations on what to try? I'm not really clear on exactly what the function is trying to do other then delve into the menu structure looking for links.
We do have i18n and Globalredirect installed which seem like possible causes for issues.
Thank you.
Comment | File | Size | Author |
---|---|---|---|
#19 | admin_menu-1699230-19.patch | 467 bytes | truls1502 |
#17 | admin-menu-infinite-loop-1699230.patch | 948 bytes | wstocker |
#15 | admin_menu-1699230-15.patch | 410 bytes | truls1502 |
Comments
Comment #1
cobendes CreditAttribution: cobendes commentedI have all my administration right taken away. I can not instal a module either update it. it is looping.
Comment #2
damontgomery CreditAttribution: damontgomery commentedcobendes,
If you don't use drush, you can disable the module by deleting the folder. That may help you in the short term to get back control of your site.
Comment #3
jeeba CreditAttribution: jeeba commentedI have the same problem, Im currently debbuging, but I discovered that you can deactivate any module via database. With this code you will see the list of modules
SELECT * FROM 'system' WHERE 'type' = 'module' ORDER BY 'system'.'status' DESC
The status in 1 means an active module so you must update the module status field to 0.
Hope this help someone
Comment #3.0
jeeba CreditAttribution: jeeba commentedremoved local path
Comment #4
weseze CreditAttribution: weseze commentedWe just experienced this on a project in development. Seems to be related somehow to display suite. The function admin_menu_merge_tree is trying to create links for managing the display of every node type and every ds view mode over and over again. Not sure why this is as we don't have much time to dig deep here.
I created a simple patch that stops the recursion in admin_menu_merge_tree from happening when the parent tree and the "child" item being passed in the recursion are exactly the same.
Comment #5
weseze CreditAttribution: weseze commentedComment #6
weseze CreditAttribution: weseze commentedWe are finding ourselves having to comment out "admin_menu_merge_tree($item, $tree_dynamic, array($new_expand_map));" completely to prevent these errors...
Reinstalling the site from scratch seems to fix it most of the time. Could this be a weird caching issue?
Comment #7
hyside CreditAttribution: hyside as a volunteer commentedFor what it's worth, we have also run into this issue. Admin menu had run fine for us until around two months ago, when we had to disable the module to regain logged in access to the site. None of the modules we had recently introduced appeared to play a role (we disabled them one-by-one and the problem remained, we are not using display suite either).
To add to the confusion, this issue occurs only on our production site (not our dev or training sites that mirror the production DB and files directory nightly), and until today, we were unable to reproduce this issue with a local instance and were unwilling to try out changes on our production site. Today, this issue occurred in a local dev environment, so we were able to try some things to see what would work. The patch in #4 unfortunately didn't help, and like the poster in #6, we had to comment out the call to the admin_menu_merge_tree function to allow us to log in to the site and once again see and use the admin menu.
Comment #8
Chris CharltonI'm seeing performance issues with
admin_menu_merge_tree()
using New Relic.Comment #9
Chris CharltonComment #10
truls1502I am sorry for no reply until now.
There are many issues regarding this module admin_menu which is a bit difficult for us to follow up since some of the issues might be already outdated, or is already fixed by the module or any other modules or itself core which means that the problem might no longer need to be fixed.
We can see that the issue has been created for a few years ago, I hope it is okay for you that I am postponing the issue, and give you around two weeks. If you still face the problem, could you tell us the step by step when until you get the error message or what is frustrated you, and a list of modules you are using related to admin_menu and a screenshot that might help us? So it makes us easier to reproduce your issue.
However, after two weeks with no feedback - we will close this issue. So in case, you noticed it after the issue is closed, do not hesitate to reopen it like and fill information which is mentioned above.
So before giving us a feedback, do you mind to test it again with our latest 7.x-3.x-dev?
Thank you for understanding! :)
Comment #11
wstocker CreditAttribution: wstocker commentedI was experiencing this issue on one or two client sites out of about 50 or so that have this module enabled.
I updated to 7.x-3.x-dev and still experienced the issue, so I rolled back to 7.x-3.0-rc5.
Fixed eventually by switching variables in admin_menu.inc line 190: $expand_map = $current_expand_map;
In the reverse order as they currently are in the module, sites with this issue would experience an infinite loop and eventually exit due to a fatal error.
Patch attached.
Comment #12
truls1502Great and good job @wweihs.
I have changed the status to Needs Reviews which we need to have someone to take a look at the patch you made. Before we can push it forward to Git, we need a minimum of two RBTC of the Drupal community.
Comment #13
truls1502Comment #15
truls1502I have reolled the patch.
Comment #17
wstocker CreditAttribution: wstocker commented@truls1502 Great!
My team discovered that if the expanded map was empty, we would get empty variable notices logged.
I updated the patch with an empty var check (attached).
Comment #19
truls1502Corrected and rerolled your patch #17.
Comment #20
truls1502Comment #21
Chris Matthews CreditAttribution: Chris Matthews commentedThe patch in #19 applied cleanly to 7.x-3.x-dev and after testing fixes this issue for me so I'm changing the status to RTBC. Hopefully this gets committed for the next 7.x release, be it -rc7 or 7.x-3.0.
Comment #23
truls1502