Closed (fixed)
Project:
Drupal core
Version:
6.12
Component:
node system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2009 at 13:45 UTC
Updated:
19 Feb 2010 at 15:30 UTC
Hello!
I am trying to alter he node_delete_confirm form. I just user drupal_get_form to get the form and but getting an error
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'node_delete_confirm' was given in D:\wamp\www\daldev\includes\form.inc on line 366
i have also tried in this way
$nid = arg(1);
$node = array("nid" => $nid);
drupal_get_form("node_delete_confirm", $node);
but still the same error
what and where i am doing wrong
i need help...
thanks
Comments
Comment #1
haroon373 commentedhelp me out from this issue guys
its become critical for me ...
thanks
Comment #2
takim commentedhello,
This is one of the critical bug i faced in drupal 6.
The solution which quite ok i think so.
To use node_add() or drupal_get_form(any node type form) then u need to include
include_once(drupal_get_path('module', 'node') . '/node.pages.inc'); inside your function where you calling the node_add or drupal_get_form function
so that it could access the node_form function or node_form functions. to render the form.
Cheer!
Takim
Comment #3
dave reidComment #2 is correct. You need to include the right file first. Note you should actually use
module_load_include('inc', 'node', 'node.pages');.Comment #4
haroon373 commentedThank you very much guys
It work like a charm
Comment #5
craigmc100 commentedHello
I'm getting the error below
warning: call_user_func_array(): First argumented is expected to be a valid callback, 'forms_node_form' was given in /var/www/intranet/includes/form.inc on line 372.
This doesn't allow me to edit any top level navigation fields made.
If anyone could help I'd be most grateful
Regards
CRM