Below I have changed the default tab at /admin
to /admin/index
, but now /admin/tasks
is 403. Even if I change $items['admin/tasks']['access callback']
to TRUE
I'm still denied access.
function hook_menu_alter(&$items) {
$items['admin/tasks']['page callback'] = 'system_admin_menu_block_page';
$items['admin/tasks']['access arguments'] = $items['admin']['access arguments'];
$items['admin/tasks']['file'] = $items['admin']['file'];
$items['admin/tasks']['type'] = MENU_LOCAL_TASK;
$items['admin']['page callback'] = $items['admin/index']['page callback'];
$items['admin/index']['type'] = MENU_DEFAULT_LOCAL_TASK;
unset($items['admin/index']['page callback']);
unset($items['admin/index']['access arguments']);
unset($items['admin/index']['file']);
}
How can I both restore access to /admin/tasks
and set the default tab to /admin/index
?
Resolution: The admin module was the problem. It's enabled by default in my installation profile.