By kendre_paresh on
Hi all,
I have created my own module, where in i have a user input form and on submit of that form i need to invoke the node_save() function. basically i want to save my content as a node.
i have written following code in my _submit() function
$node = (object)$node;
$node->type = 'webpage'; // new content type that i have created
$node->uid = $uid;
$node->title = $pageName; // the variables have actual title and description
$node->body = $pageBody;
$node->created = time();
$node->teaser_include = 1;
$node->format = 1;
$node->name = $user->name;
$node->status = 1;
when i click on submit i can find my content in node, node_revision, workflow tables. but when i tried the url ?q=node/% (new nid from node table), it takes lot of time and ends with memory execution and/or allowed memory size error.
Could you please correct me if any.
I am using Drupal 6.20 and Workflow module.
thanks in advance.
- paresh.
Comments
I also tried to call
I also tried to call node_form_submit($form, $form_state);
my code is
when i tried this code it says Fatal error: Allowed memory size.....
Please advice.
May be ia have missed few parameters while creating node object and/or $form_state array