Hi there, very small bug when admin menu and admin views are both enabled.

If the Comment module is disabled, the Comments view still tries to give itself a menu item, resulting in an empty title-less half-size menu item that points to a dead url.

The ideal way to fix would be to make the Comment view conditional on the Comment module being enabled - I don't know enough about configuring default views to make that work reliably, so here's a quick temporary fix that at least cleans up the menu for sites not using comments.

In admin_menu/admin_menu.module near line 158 (or, in a custom module calling hook_menu_alter()):


/**
 * Implements hook_menu_alter().
 */
function admin_menu_menu_alter(&$items) {
  if (!module_exists("comment") && isset($items['admin/content/comment'])) {
    unset($items['admin/content/comment']);
  }
  // Flush client-side caches whenever the menu is rebuilt.
  admin_menu_flush_caches();
}

Comments

GuyveR800’s picture

I can confirm this.

Additionally, when enabling admin views, I get an empty menu item between the "Modules" and "Configuration" items. I haven't found yet how to fix it.

sun’s picture

sun’s picture

Project: Administration menu » Administration Views
Version: 7.x-3.x-dev » 7.x-1.x-dev