Can't seem to get hook_menu to work at all. I'm using the following code:
function mymodule_menu(){
$items = array();
$items['node/%node/mymodule-product'] = array(
'title' => 'Edit Product',
'page callback' => 'mymodule_product_redirect',
'page arguments' => array(1),
'access callback' => 'edit any commerce product entity',
'weight' => 6,
'type' => MENU_LOCAL_TASK,
);
dsm('check');
return $items;
}
dsm()
from the devel module is outputting fine when I clear the site cache, so the hook is firing, however for whatever reason the link is refusing to display on the node tabs.
Visiting any of the node tabs already displaying, outputs the following errors:
Notice: Undefined index: access in _menu_translate() (line 778 of includes/menu.inc).
Notice: Undefined index: access in menu_local_tasks() (line 1892 of includes/menu.inc).
And manually going to a page that would be defined in hook_menu outputs a load more errors in the same vein:
Notice: Undefined index: access in _menu_translate() (line 778 of includes/menu.inc).
Notice: Undefined index: access in menu_get_item() (line 464 of includes/menu.inc).
Notice: Undefined index: access in menu_execute_active_handler() (line 499 of includes/menu.inc).
Notice: Undefined index: access in menu_tree_page_data() (line 1167 of includes/menu.inc).
Notice: Undefined index: access in menu_tree_page_data() (line 1167 of includes/menu.inc).
Notice: Undefined index: access in menu_local_tasks() (line 1845 of includes/menu.inc).
Notice: Undefined index: access in menu_tree_page_data() (line 1167 of includes/menu.inc).
Notice: Undefined index: access in menu_tree_page_data() (line 1167 of includes/menu.inc).
Notice: Undefined index: access in menu_tree_page_data() (line 1167 of includes/menu.inc).
While these are all only PHP Notices, I assume they still may be relevant.
Thanks!