<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello everybody,<br>
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...)<br>
<br>
My module:<br>
<br>
<?php<br>
/*<br>
* Show the edid page to a specific nid.<br>
*/<br>
<br>
function control_center_menu() {<br>
$items = array();<br>
module_load_include('inc', 'node', 'node.pages');<br>
$nid = 4;<br>
$node = node_load($nid);<br>
$items['test/test'] = array(<br>
'title' => 'Edit this node',<br>
'description' => 'Edit this node.',<br>
'page callback' => 'drupal_get_form',<br>
'page arguments' => array('page_node_form', $node),<br>
'access callback' => TRUE,<br>
);<br>
return $items;<br>
}<br>
<br>
<br>
However, at test/test I get a bunch of errors:<br>
<ul>
<li><em class="placeholder">Warning</em>: call_user_func_array()
expects parameter 1 to be a valid callback, function 'node_form'
not found or invalid function name in <em class="placeholder">drupal_retrieve_form()</em>
(line <em class="placeholder">795</em> of <em
class="placeholder">/home/christian/workspace/gigs/includes/form.inc</em>).</li>
<li><em class="placeholder">Notice</em>: Undefined index: #node in
<em class="placeholder">menu_form_node_form_alter()</em> (line <em
class="placeholder">629</em> of <em class="placeholder">/home/christian/workspace/gigs/modules/menu/menu.module</em>).</li>
<li><em class="placeholder">Notice</em>: Trying to get property of
non-object in <em class="placeholder">menu_form_node_form_alter()</em>
(line <em class="placeholder">629</em> of <em
class="placeholder">/home/christian/workspace/gigs/modules/menu/menu.module</em>).</li>
<li><em class="placeholder">Notice</em>: Undefined index: #node in
<em class="placeholder">menu_form_node_form_alter()</em> (line <em
class="placeholder">630</em> of <em class="placeholder">/home/christian/workspace/gigs/modules/menu/menu.module</em>).</li>
<li><em class="placeholder">Notice</em>: Trying to get property of
non-object in <em class="placeholder">menu_form_node_form_alter()</em>
(line <em class="placeholder">630</em> of <em
class="placeholder">/home/christian/workspace/gigs/modules/menu/menu.module</em>).</li>
</ul>
<p>And instead of the hole form I only get the Menu setting check
box and the URL path settings.<br>
</p>
<p><br>
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!<br>
</p>
<p>Christian<br>
</p>
<br>
</body>
</html>