I have an 'edit' link but no 'delete' link which I want, and I'm confused as to how Drupal goes about deciding whether to render the link or not.

  • node_access is not being called with 'delete' as an operation when on the page.
  • I've rebuilt the permissions table.
  • my hook_access returns TRUE always. Yup, I know. This is for testing! ; )
  • I see no link as the Administrator.
  • I've logged out and in.
  • I've uninstalled and re-installed my module

I'm stumped. Any ideas on what to check next?

-b

Comments

nevets’s picture

It sounds like your module implements a custom content type. Which hooks have you implemented?

bobzibub’s picture

I've implemented, or at least hacked together:
delete,insert,update,load,theme,perm..
I have not completed the access checking.

I have multiple node types in the mod and perform a switch for each type..
function --module--_update(&$node){ $f=__FUNCTION__.'_'.$node->type; return $f($node);}
Which calls:
--module--_update_--node_type--.....

So five different node types in this module.

nevets’s picture

'Delete' is a button on the edit page (not a link).

bobzibub’s picture

The table headings are:
Title Type Author Status Operations

Under Operations, there is an 'edit' link. But there is no 'delete' link.

Cheers,
-b

jaypan’s picture

Is there a delete button on the node edit page?

Contact me to contract me for D7 -> D10/11 migrations.

bobzibub’s picture

...is now vamoose. I'm sure it was there!

nevets’s picture

What page (url) are you looking at?

bobzibub’s picture

nevets’s picture

There is no delete link under operations.

You can use the checkbox and and pick delete under "Update options".

bobzibub’s picture

The link i imagined must be the ones in content types.

I apologize for wasting your time.

Sorry!
-b

diogo_plta’s picture

The delete operation when I use the selec all option don't work.

I tried to run a php script, using while and node_delete($nid). It only delete the first node, then redirect to the front page.

I tried use the views bulk operation too, the same thing, delete one and redirect to the front page.

All the modules and core was update to the last version.

bobzibub, did you fix this problem?