With the new Admin sidebar enabled, when I click on 'Administer', nothing is displayed below it.

Comments

jeffschuler’s picture

Does it appear when you disable the DHTML Menu module?

If so, mark this issue a duplicate of #639174: CONFIRMED: Incompatible with the DHTML Menu Module.
See also #646758: Incompatible with the admin module.

opdavies’s picture

Status: Active » Closed (duplicate)

Yes, it does.

abaddon’s picture

Version: 6.x-2.0-beta4 » 6.x-2.0-beta5
Status: Closed (duplicate) » Active

not in my case, i dont have dhtml menu
and this happens only on the frontend, when im under /admin/* the menu displays ok, but on the site pages its empty and title not linked to /admin
the rest of the menu blocks are ok

what could cause this? any hints to what i should be looking for?

abaddon’s picture

heres some more info, the admin links are actually on the page, but theyre hidden
ive did a quick diff between what i have on the frontpage and whats on the backend admin, and there were some extra <span></span> wrappers on the frontend side, where i have this problem

the main div containing the Admin links and all, #block-admin-menu had a class on it drilldown, which in css targets the menu under it to not display

.drilldown ul.menu li {
display:none !important;
}
admin.menu.css (line 112)

so this is why my menu doesnt display, if i remove that class, i get all the links in the menu without "folders", a very big list..

edit: found the culprit, admin module is not resilient to menu item links theming, or the theme im using does something really useless..
im using a subtheme of typebased, and it declares function typebased_menu_item(), which just adds span tags around the menu links
return '<li class="'. $class .'"><span>' . $link . $menu ."</span></li>\n";
to fix it, ive hooked that function from my subtheme and removed the span tags.. and some fixing in the css

admin module should be fixed to not choke on extra markup inside the LI menu items

yhahn’s picture

Status: Active » Fixed

I've committed a custom theme function that simply wraps core's theme_menu_item_link() here: http://drupal.org/cvs?commit=404334

Note that this is a half-solution at best -- the jquery.drilldown.js plugin in admin is meant to work with the default menu tree output that Drupal core produces, and it won't be adjusted to deal with the infinite possible theme overrides that someone might add into the mix.

abaddon’s picture

i wonder if drilldown cant be adjusted to ignore "extra" markup, the code there is terrifying :-) ill have it on my todo list and see if it can be done better..

abaddon’s picture

your fix works wonderfully, just tested, it allows themes to modify menu items as they want and only takes care of the admin menu not getting modified

ignore my previous comment, this is fixed

yhahn’s picture

Assigned: Unassigned » yhahn
Status: Fixed » Active

I needed to revert this commit because the admin_menu module provides the exact same function and there is a namespace collision.

I need to look into the version of this function that admin_menu provides and see if a function_exists() or similar declaration can resolve the conflict.

abaddon’s picture

im looking at this.. i dont think you should rely on admin_menu, there no guarantee that function wont change in the future, its not API exported function
also, it should have been named function theme_admin_menu_menu_item not function theme_admin_menu_item, not that its a hook or anything, but to respect the namespace
ive opened up an issue there http://drupal.org/node/879712 , i think admin_menu should fix its naming

p.s. thank you for fixing this

yhahn’s picture

Thanks for posting but I think it's rather unreasonable for admin_menu to change its stable branch, especially when it predates this change in this project. See http://drupal.org/node/879712#comment-3313636

Should be simple enough to deal with here.

abaddon’s picture

i dont think its a big change, and its a ns bug, why not give the devs there the chance to reply? i dont mind keeping this issue as a .patch file in my admin/ folder and apply it when i need to, but.. anyway, your call

yhahn’s picture