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.

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

cobendes’s picture

I have all my administration right taken away. I can not instal a module either update it. it is looping.

pandaeskimo’s picture

cobendes,

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.

jeeba’s picture

I 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

jeeba’s picture

Issue summary: View changes

removed local path

weseze’s picture

We 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.

weseze’s picture

Version: 7.x-3.0-rc3 » 7.x-3.x-dev
weseze’s picture

Priority: Normal » Major

We 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?

hyside’s picture

For 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.

Chris Charlton’s picture

I'm seeing performance issues with admin_menu_merge_tree() using New Relic.

Chris Charlton’s picture

Priority: Major » Critical