Forums / Setup & design / new node without a draft?

new node without a draft?

Author Message

Kristof Coomans

Tuesday 07 February 2006 5:56:42 am

The ezfloat datatype doesn't validate when it can't find it's post variable. Try to add a hidden field for the float attribute and put a valid value in it.

Maybe you can turn off view caching for the specific template and add a cache-block around the hierarchical list of activities. As cache-block key you can use the modified_subnode attribute of the top node of your activity list.

Thanks for your feedback!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Paul Forsyth

Tuesday 07 February 2006 7:06:13 am

Would smart cache be an option here? It is limited but since the action is publishing an object smart cache should be able to clear some of the objects.

Nicolas Trani

Monday 16 April 2007 6:12:47 am

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 :/

Kristof Coomans

Monday 16 April 2007 6:22:56 am

Hi Nicolas

This bug in eZ publish causes the incorrect object name: http://issues.ez.no/10377. I fixed it in svn.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Nicolas Trani

Monday 16 April 2007 7:08:34 am

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)

Kristof Coomans

Monday 16 April 2007 7:11:57 am

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[]

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Nicolas Trani

Monday 16 April 2007 7:41:11 am

Okay now all works great :) Thank you for your very fast answer!

Guillaume Kempfer

Monday 04 June 2007 1: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

Sébastien Antoniotti

Thursday 15 May 2008 4:00:12 am

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 !

eZ Publish Freelance
web : http://www.webaxis.fr

Sébastien Antoniotti

Thursday 15 May 2008 5:28:26 am

It's OK !

I needed to replace

EZ_MODULE_STATUS_RERUN

by

eZModule::STATUS_RERUN

at line 223, and I suppose that I have to replace allconstants like this.

I hope it will help ;)

eZ Publish Freelance
web : http://www.webaxis.fr

Kristof Coomans

Thursday 15 May 2008 6:26:52 am

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

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Sébastien Antoniotti

Thursday 15 May 2008 6:55:06 am

Hi Kristof,

Thanks a lot for the information, and thanks for your very usefull work !

eZ Publish Freelance
web : http://www.webaxis.fr

Ben Ryan

Tuesday 07 October 2008 6:03:22 pm

Hi,

I'm using the powercontent, which is awesome by the way. I followed the tutorial provided here: http://www.ezsystems.ca/blog/ez_publish_blog_enhancements_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.

Kristof Coomans

Tuesday 07 October 2008 11:54:52 pm

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.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Fredrick Sabu

Tuesday 21 October 2008 9:58:21 pm

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/developer/login_editing_objects_with_ajax/re_login_editing_objects_with_ajax__7 - Second last post by Xavier)

Anyone know which Captcha systems work with Powercontent?

Kjetil Lund

Wednesday 04 March 2009 4:22:23 am

Continued here:
http://ez.no/developer/forum/developer/captcha_anti_spam_using_powercontent/re_captcha_anti_spam_using_powercontent__2

eZ debug

Timing: Jan 30 2025 19:53:27
Script start
Timing: Jan 30 2025 19:53:27
Module start 'content'
Timing: Jan 30 2025 19:53:29
Module end 'content'
Timing: Jan 30 2025 19:53:29
Script end

Main resources:

Total runtime1.5760 sec
Peak memory usage10,240.0000 KB
Database Queries260

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 588.4531370.2969
Module start 'content' 0.00831.3234 958.75004,807.7813
Module end 'content' 1.33170.2442 5,766.53131,214.3906
Script end 1.5759  6,980.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00520.3302210.0002
Check MTime0.00160.0991210.0001
Mysql Total
Database connection0.00070.045010.0007
Mysqli_queries1.339284.97582600.0052
Looping result0.00330.21132580.0000
Template Total1.518896.420.7594
Template load0.00200.124220.0010
Template processing1.516896.246420.7584
Template load and register function0.00180.114810.0018
states
state_id_array0.00180.112710.0018
state_identifier_array0.00210.133420.0011
Override
Cache load0.00190.1201870.0000
Sytem overhead
Fetch class attribute can translate value0.00300.190690.0003
Fetch class attribute name0.00180.1155180.0001
XML
Image XML parsing0.01080.686190.0012
class_abstraction
Instantiating content class attribute0.00010.0042240.0000
General
dbfile0.02581.6389330.0008
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
16content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
22content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 56
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs