[development] delete menu not appearing
kb at 2bits.com
Thu Aug 21 14:30:15 UTC 2008
On Thu, Aug 21, 2008 at 7:28 AM, Lluís <enboig at gmail.com> wrote:
> I forgot to say I added some "extra menu" to make me easy to customize
> the menus like:
> $items = array('path' => 'comptacau/projectes/'. arg(2) .'/delete',
> 'title' => t('Delete'),
> 'callback' => 'drupal_get_form',
> 'callback arguments' =>
> array('node_delete_confirm', $node),
> 'access' => node_access('delete', $node),
> 'weight' => 1,
> 'type' => MENU_LOCAL_TASK);
node_access() expects a $node object to be passed in. You have not pasted
the entire hook_menu function from your module, but I if you do want to
check node_access(), you have to make sure you do node_load() beforehand, on
that path so node_access has something to check.
Khalid M. Baheyeldin
Drupal optimization, development, customization and consulting.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development