Hello everybody, I am new to drupal and am stuck at a very basic problem. I would like to simply show the edit page to a known node id. (The reason I want to do this is because I would like to append a form to a view late, but one step at a time...)
My module:
<?php /* * Show the edid page to a specific nid. */
function control_center_menu() { $items = array(); module_load_include('inc', 'node', 'node.pages'); $nid = 4; $node = node_load($nid); $items['test/test'] = array( 'title' => 'Edit this node', 'description' => 'Edit this node.', 'page callback' => 'drupal_get_form', 'page arguments' => array('page_node_form', $node), 'access callback' => TRUE, ); return $items; }
However, at test/test I get a bunch of errors:
* /Warning/: call_user_func_array() expects parameter 1 to be a valid callback, function 'node_form' not found or invalid function name in /drupal_retrieve_form()/ (line /795/ of //home/christian/workspace/gigs/includes/form.inc/). * /Notice/: Undefined index: #node in /menu_form_node_form_alter()/ (line /629/ of //home/christian/workspace/gigs/modules/menu/menu.module/). * /Notice/: Trying to get property of non-object in /menu_form_node_form_alter()/ (line /629/ of //home/christian/workspace/gigs/modules/menu/menu.module/). * /Notice/: Undefined index: #node in /menu_form_node_form_alter()/ (line /630/ of //home/christian/workspace/gigs/modules/menu/menu.module/). * /Notice/: Trying to get property of non-object in /menu_form_node_form_alter()/ (line /630/ of //home/christian/workspace/gigs/modules/menu/menu.module/).
And instead of the hole form I only get the Menu setting check box and the URL path settings.
What am I doing wrong? I tried hard to find a noob friendly copy past example but didn't find any... Thanks a lot in advance!
Christian