Saturday 11 September 2004 4:11:42 am
I'm setting up a new eZ site, and want my users to be able to add/edit content from the frontend when they are logged in. I have sucessfully made the edit function. Now I want a 'add new content' form in my templates so users can add content. I have done following at the bottom of my folder-template;
{section show=count($node.object.can_create_class_list)}
<form method="post" action="/content/action">
<input type="hidden" name="NodeID" value="{$module_result.node_id}" />
<select name="ClassID">
{section name=Classes loop=$node.object.can_create_class_list}
<option value="{$Classes:item.id}">
{$Classes:item.name|wash}</option>
{/section}
</select>
<input class="button" type="submit" name="NewButton" value="{'Create here'|i18n('design/standard/node/view')}" />
</form>
{/section}
Wich makes the form right, but when I click 'Create here' I get the following error:
Fatal error: Call to a member function on a non-object in /home/midhand/public_html/ez-3.4.1/kernel/content/action.php on line 83 Fatal error: eZ publish did not finish it's request
Debug output:
Warning: eZContentObjectTreeNode::fetch Sep 11 2004 13:05:26
Cannot fetch node from empty node ID I have tried to remove this line: <input type="hidden" name="NodeID" value="{$module_result.node_id}" />
and then it works, but I have to decide where I want to put the new content, cause eZ didn't fetch what node I came from. I run eZ 3.4.1 btw.
|