The code for the stock menu item is:
$items['node/%node/edit/uc-stock'] = array(
'title' => 'Stock',
'page callback' => 'drupal_get_form',
'page arguments' => array('uc_stock_edit_form', 1),
'access arguments' => array('administer product stock'),
'weight' => 10,
'type' => MENU_LOCAL_TASK,
'file' => 'uc_stock.admin.inc',
);
So, this will show up on any node regardless of whether it's a product or not. This needs to be fixed with a solution like the attribute module, which uses a custom access callback to determine whether or not a tab should be displayed for the node:
$items['node/%node/edit/uc-attributes'] = array(
'title' => 'Attributes',
'page callback' => 'drupal_get_form',
'page arguments' => array('uc_object_attributes_form', 1, 'product', 'overview'),
'access callback' => 'uc_attribute_product_access',
'access arguments' => array(1),
'type' => MENU_LOCAL_TASK,
'weight' => 1,
'file' => 'uc_attribute.admin.inc',
);
Comments
Comment #1
cha0s commentedPatch action. (Assuming product kits should be disallowed.)
Comment #2
Island Usurper commentedCool, cool.
Committed.