Download & Extend

"You do not have any administrative items." - Callback: system_main_admin_page() doesn't exist!

Project:Diagnostic Tools
Version:6.x-1.1-rc1
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I've been all over looking up solutions for my WSOD problem. I only get white screens on pages rooted in the admin/* folder.

Using Dtools, I found this on my admin.php page.

Comments

#1

Did you try to run in emergency mode:
sites/all/modules/dtools/wsod/wsod_emergency.php?q=admin
Where q is a path where you have WSOD? Make sure that you have correct path.

Basically:

ERROR: Callback: system_main_admin_page() doesn't exist!

means that your menu_router table is truncated or file system.admin.inc doesn't exist.
Make sure that you have your system module in modules\system dir and existing file system.admin.inc in this dir. And also that you have no any duplicates of this file in your Drupal root directory.
Then to rebuild your menu_router table when callback doesn't exist, try the latest dev version of dtools, it will rebuild your menu_router table in case when callback doesn't exist.

#2

Status:active» postponed (maintainer needs more info)

Have you fix your problem?

#3

Hi kenorb,

I do have a similar problem: if I try to access the admin main page (q=admin) I get the error message: "You do not have any administrative items." Neither do I have the standard navigation menu, where you normally can access the create content link or even logout. The menu is shown on menu settings page, but I do not have a block to configure on the block administer page.

I can, however, access admin/build as well as admin/settings. By using phpMyAdmin I found that there's no single entry in the menu link table pointing to 'admin'. So I tried to rebuild everything without success. I have administration menu module installed and it doesn't show create content links neither. So whenever I want to add a new node I have to enter node/add/... into address bar.

Is there a way to force wsod to rebuild menu tables as I do not really get a WSOD, the admin page only tells me: You do not have any administrative items.

Thanks in advance,
sin

#4

In this case menu_router table is ok, but menu_links table is truncated after admin_menu 6301 update:

<?php
  db_query
("DELETE FROM {menu_links} WHERE router_path LIKE 'admin%%'");
?>

and Drupal was unable to rebuild it by it-self.
#511744: /admin page links are broken with latest development snapshot

You can compare between your backup table and truncated table via:

SELECT * FROM menu_links WHERE link_path LIKE 'admin%' GROUP BY menu_name;

No navigation items.

I'll check for possible solutions.

#5

Title:ERROR: Callback: system_main_admin_page() doesn't exist!» "You do not have any administrative items." - Callback: system_main_admin_page() doesn't exist!
Status:postponed (maintainer needs more info)» active

Basically problem of "You do not have any administrative items." is that Drupal can't find proper admin navigation tree by this query:

SELECT * FROM menu_links WHERE link_path = 'admin' AND module = 'system'

in system_main_admin_page()
Normally mlid for this admin three should be = 2
It could be overridden by some modules (like admin_menu) or removed completely.
I'm not sure if there is some way to rebuild it, because it doesn't exist anymore.

#6

Status:active» needs review

Simple solution to restore administrative items broken by admin_menu:
1. Disable 'Administration menu' module (admin/build/modules)
2. Rebuild menu by just going to: admin/build/modules
You should have your administrative items restored.
Update 'Administration menu' module to some stable version
or wait for some fix available on #511744: /admin page links are broken with latest development snapshot
and enable it again.

Added option to 'Rebuild menu' from admin/build/dtools in WSOD module in lastest dev:
http://drupal.org/cvs?commit=236834
But it will not solve the problem, if modules with implementation of hook_menu_alter() will be still active (like admin_menu).

#7

Hey kenorb,

thanks a lot for this explanation. It helped me lot.

Best,
sin

#8

The only thing that fixed what this did, was to restore my site to an unadulterated backup. None of the suggestions above worked, not sure why it wouldn't rebuild the menus. The only one that would rebuild was the site configuration and advanced help sections .. everything else was gone! lol .. good thing I made a backup before upgrading admin_menu .. whew! Im going back to the 1.x for a while... o_O

#9

Hey kenorb,

Bingo, #6 worked for me. Thanks.

#10

Status:needs review» fixed

#11

Status:fixed» closed (fixed)

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

#12

This problem happened to me when i simply uploaded the site to it's definitive place. I'm using admin-menu 6.x-1.0-beta3, and for everything else i have the latest version. None of the suggestions above worked. And i don't have the choice to restore to a previous stable state, because the instalation is brand new. I looked over and over for a solution and until now i found none. It seems i'm stucked for good.
I would reinstall everything from scratch, but the DB is already populated with hundreds of articles, hundreds of terms and thousands of images.
Can anyone please help?

#13

If you have this problem with the admin module (1.x version), try disabling and enabling the admin module.
You will have to re-enable your quicklinks in the admin toolbar, but that's a small price to pay.

#14

I had a similar problem the problem turned out to be permissions. I simply replaced the values in the permission table with valid values from another drupal installation's permission table and now all is well.

#15

I had to click the reset button in my navigation menu next to each menu item. One by one they became available again.

nobody click here