I've installed chain_menu_access module as the required module by the Path Access module, and found that all of the local task menus are hidden when the modules are enabled.
Drilling down into the code, I found that the function _chain_menu_access_callback() is called with a one-element-array as an arguments, which is the original access callback argument of the menu item, then, the code extract their required parameters at the following line:
list($old_access_callback, $new_access_callback, $count, $or, $pass_index) = array_shift($args);
The line above result that all of the parameters become invalid (i.e., extract the original access argument into pieces) and cause the function return FALSE to the caller which make the menu item blocked.
I guess that this menu item should not be passed to the function _chain_menu_access_callback(), unless they are processed by the function chain_menu_access_chain(). However, by some unknown reason, I found that the 'access callback' argument in the database is set to _chain_menu_access_callback and then make the menu item passed to the function.
My Quick and Dirty fix on this is to add the following code in front of the line above:
if ( count($args[0]) < 5 ) {
array_unshift($args, array('user_access', 'user_access', 1, FALSE, FALSE));
$args[] = $args[1];
}
Comments
Comment #1
salvisI'm moving this to the Path Access module queue.
There are a number of client modules that use CMA successfully, and (without having studied the issue in detail) I would guess that Path Access is not providing the correct parameters.
See Forum Access for D7 for an example of successful usage.
Comment #2
buddaThis is probably fixed as part of #1567094: Chain Menu Access API reports error probably coming from Path Access in the dev snapshot. Give it a try.
Comment #3
buddaI've not experienced the described problem with local tasks going AWOL since January 2013.