Monday 16 January 2006 4:06:26 pm - 35 replies
Hi,
I was wondering if it is possible to create a new node without first creating a draft?
i.e. Instead of having to create a new draft and then filling it in and publishing it. Would it be possible to have a form which has the correct attributes for a class and which, when submitting it will create a new object.
I am hoping to use this to collect information on a site, but can't use information collectors because the user needs to uplaod a file and this datatype is not an information collector.
Cheers,
BJPirt
Monday 16 April 2007 3:12:47 pm
Hi
Your extension works great but i am experiencing a problem.
With object relation i have a set of check box that is object relation, when i submit the form, the information is not inserted :/
Here is the part of my code :
<input checked="checked" class="checkbox" name="powercontent_type_ContentObjectAttribute_data_object_relation_list_pcattributeid" value="232" type="checkbox">Offre de stage<br> <input class="checkbox" name="powercontent_type_ContentObjectAttribute_data_object_relation_list_pcattributeid" value="233" type="checkbox">Offre de poste<br>
I am running under eZ publish v3.9.0, and svn revision 1590 of powercontent
I override content/edit.tpl to show personalized form (only for my specific class on a specif siteaccess).
This object relation is required to submit the form and i have no error relative to that when i check at least one box. And form is submitted! When i go on my ez publish admin i can see the entry but the object name is empty but when i look the entry the field is correctly filled oO ?
Am i doing something wrong? Is something missing?
Thx
Ps : Sorry for my English i am French :/
Monday 16 April 2007 3:22:56 pm
Hi Nicolas
This bug in eZ publish causes the incorrect object name: http://issues.ez.no/10377. I fixed it in svn.
Monday 16 April 2007 4:08:34 pm
Whooo thank you for your very fast answer
In fact i have two problems. I'am sorry i have not correctly exposed my problem in my previous post :/
1st problem [solved] ) The object name is not correctly saved (ok now it's solved with the fix you submitted)
2nd problem [not solved]) Field that are object relation is not saved but the form is correctly submitted! And Those form field is required, if y pick none i have an error, but when i pick at least one, form is correctly submitted.
Do you know why? (code used to create check box is in my previous post)
Monday 16 April 2007 4:11:57 pm
Hi Nicolas
I think the names of your input fields are incorrect. Try changing powercontent_type_ContentObjectAttribute_data_object_relation_list_pcattributeid to powercontent_type_ContentObjectAttribute_data_object_relation_list_pcattributeid[]
Monday 04 June 2007 10:04:22 pm
I'm trying to use powercontent to add comments on my blog so i've set my form like that :
<form enctype="multipart/form-data" method="post" action={"powercontent/action/"|ezurl}>
<input type="hidden" name="NodeID" value="{$node.node_id}" />
<input type="checkbox" name="DoPublish" checked="checked" />
<input type="hidden" name="UseNodeAssigments" value="0" />
<input type="hidden" name="ClassID" value="18" />
<input type="hidden" name="RedirectURIAfterPublish" value="/{$node.url_alias}" />
<label>Nom</label>
<input type="text" name="powercontent_nom_ContentObjectAttribute_ezstring_data_text_pcattributeid" value=""/>
<label>Courriel</label>
<input type="text" name="powercontent_courriel_ContentObjectAttribute_ezemail_data_text_pcattributeid" value =""/>
<label>Website</label>
<input type="text" name="powercontent_website_ContentObjectAttribute_ezstring_data_text_pcattributeid" value =""/>
<label>Comment</label>
<input type="text" name="powercontent_comment_ContentObjectAttribute_ezstring_data_text_pcattributeid" value =""/>
<input class="classbutton" type="submit" name="CreateButton" value="Commenter" />
</form>
but it seems that i cannot publish email adress and textblock :/
----- edit
Ok i get it ! It wasn't data_text and not ezemail_data_text or ezstring_data_text
Modified on Tuesday 05 June 2007 12:35:03 am by Guillaume Kempfer
Thursday 15 May 2008 1:00:12 pm
Hi,
I'm trying to use this usefull extension on EZP 4.0.
I followed all setup step, but when I click on the submit button, I'm redirected to the /powercontent/action view, with nothing into the $module_result.content and with this warning in the debug :
Warning: PHP May 15 2008 12:00:14 Use of undefined constant EZ_MODULE_STATUS_RERUN - assumed 'EZ_MODULE_STATUS_RERUN' in /srv/www/myproject/extension/powercontent/modules/powercontent/action.php on line 223
I have purged all caches after setted up policies fort content/create and powercontent/* to anonymous, but the problem is still here and no content object are created.
I'm using this form :
<form method="post" action={"powercontent/action/"|ezurl}>
<div class="buttonright">
<input type="hidden" name="NodeID" value="2" />
<label>Publish immediately:</label> <input type="checkbox" name="DoPublish" checked="checked" />
<input type="hidden" name="UseNodeAssigments" value="0" />
<input type="hidden" name="ClassIdentifier" value="article" />
<input type="hidden" name="RedirectURIAfterPublish" value="/{$node.url_alias}" />
<input type="text" name="powercontent_title_ContentObjectAttribute_ezstring_data_text_pcattributeid" value="A new article on my blog" />
<input type="text" name="powercontent_intro_ContentObjectAttribute_data_text_pcattributeid" value="A new intro on my blog" />
<input class="classbutton" type="submit" name="CreateButton" value="New article" />
</div>
</form>
Thanks in advance !
Thursday 15 May 2008 3:26:52 pm
Hi Sébastien
Sorry for not replying here, I simply missed this one. The powercontent extension has moved to projects.ez.no and there's also an eZ Publish 4 compatible version there in svn: http://projects.ez.no/powercontent
Wednesday 08 October 2008 3:03:22 am
Hi,
I'm using the powercontent, which is awesome by the way. I followed the tutorial provided here: http://www.ezsystems.ca/blog/ez_p...ts_making_commenting_more_accessible to be able to submit a comment inline on the blog post page without clicking add a comment button.
I'm wondering if it's possible to be able to have the add comment form <b>not</b> redirect to it's own page if a user filled out the form incorrectly.
At the moment, if you fill out the form correctly on the first go, it submits and reloads the blog post page again, which is perfect. But as i mentioned above, if the form is incorrect the page is pointed to a an edit comment form. I just want everything to be on the blog post page and have no redirects.
Thanks in advance.
Wednesday 08 October 2008 8:54:52 am
Hi Ben
This is unfortunately not possible at the moment, because the powercontent extension simply re-injects certain POST variables to the content/edit view and leaves further processing (validation, storage) up to that view. This was a design choice, to get quickly something working, due to the complexity (read: spaghetti code) of content/edit.
Wednesday 22 October 2008 6:58:21 am
Hi I'm loving your Powercontent extension, but I would like to know if any Captcha/ Anti Spam extensions work with Powercontent. I have tried using Ez Human, but it doesn't work. I had a quick look around the forums and found a post mentioning that most Captcha extensions don't work with Powercontent. (http://ez.no/developer/forum/deve...e_login_editing_objects_with_ajax__7 - Second last post by Xavier)
Anyone know which Captcha systems work with Powercontent?
Wednesday 04 March 2009 1:22:23 pm
You must be logged in to post messages in this topic!