Closed (duplicate)
Project:
Administration Views
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Oct 2011 at 15:31 UTC
Updated:
6 Feb 2012 at 02:50 UTC
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
Comment #1
GuyveR800 commentedI 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.
Comment #2
sun#1064928: Default views appear despite missing module dependency; no way for other modules to provide default admin views
Comment #3
sun