On Thu, Aug 21, 2008 at 7:28 AM, Lluís <enboig@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
2bits.com, Inc.
http://2bits.com
Drupal optimization, development, customization and consulting.