0
出于某种原因,即使该树或该路径中没有任何内容,“创建内容”菜单项也会显示为Anon。 (匿名只能创建一个特定类型的内容,但已被移动到它自己的顶级导航项目)Drupal6:hook_menu_alter在禁用模块后仍然有效
为了解决这个问题,我用hook_menu_alter():
/**
* Remove "create content" from the menu if the user is anon
*/
function odp_menu_alter(&$items){
global $user;
if ($user->uid == 0) {
unset($items['node/add']);
}
}
出于某种原因,这也影响了超级用户帐户。我用该代码禁用了该模块。现在创建内容链接是回来了,但它会导致这个错误:
Fatal error: Unsupported operand types in modules\system\system.module on line 626
所有这一切均低于创建内容仍然工作的子树链接。
我刷新了所有的缓存。发生什么事?