I have a node that I can see on my site, but when I try to edit it I get the error:

Notice: Undefined index: my_node_name_node_form in drupal_retrieve_form() (line 763 of /home/sites/my-site-url/includes/form.inc).
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'my_node_name_node_form' not found or invalid function name in drupal_retrieve_form() (line 798 of /home/sites/my-site-url/includes/form.inc).

I cannot see the node by going to 'content'.

I believe that what has happened is: I deleted a Content Type that was redundant on my site without realizing that there was a node of that type on the site. I guess that now the node doesn't its content type this is stopping it from being deleted.

I would like to know how to delete this node, or failing that unpublish it.

I know the NID of the node to be deleted.

I guess that one way of doing this would be manually using phpmyadmin. For this approach I would need some guidance on how to go about this as I am not very familiar with either how nodes are spread across the tables in the database or working in phpmyadmin.

  • can show me thecode in which I guess you have used drupal_form_submit. I think the my_node_name_node_form is improper
    – harshal
    Commented Nov 1, 2013 at 18:20
  • Hi Harshal. The node didn't include any custom code or form. I'm guessing the reference to the form is the default drupal edit form, as the error is occurring when I try to edit the problem node. The node previously had some fields in it, but viewing the node now only the node title is visible. Commented Nov 4, 2013 at 11:56

1 Answer 1


Ideally you should re-enable module which supports that custom node type, so the node can be properly removed.

Otherwise, you can load, edit or delete the node programmatically.

For example, to load the node using Drush, you can run:

drush ev "var_dump(node_load(1234));"

To delete it, try:

drush ev "node_delete(1234);"

Alternatively, you can delete these nodes from the node table.

To find all other references, check your database, for example with drush sql-dump --ordered-dump | grep my_node_name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.