Forums / General / publish_date, how does it work?

publish_date, how does it work?

Author Message

maja anjer

Monday 26 January 2009 12:31:53 am

I have a class article with an attribute publish_date.

In the setup/workflow menu I have added an element to the Standard workflow-group. This element is an event of type Wait until date connected to the class/attribute-combination article/publish_date.

We have also put the workflow.php-job into a cronjob, it is supposed to run every 30 minutes.

But if I publish an article with publish-date tomorrow, it will still show on the page. what have we forgotten? We have made our own fetches, do we have to put anything in the fetch? How is this supposed to work?

Best regards, maja

Gaetano Giunta

Monday 26 January 2009 12:45:25 am

You most likely need to activate the workflow by setting it to the before-publication trigger, in the 'triggers' page of the admin interface. Only creating a workflow is not enough.

The cronjob otoh is not used for the delayed publication, but for delayed de-publication. It also uses a date attribute in content classes to decide what has to be depublished, but that is set via an ini file

Principal Consultant International Business
Member of the Community Project Board

André R.

Monday 26 January 2009 1:59:33 am

The unpublish.php cronjob takes care of un-publishing, but workflow.php takes care of publishing if the workflow + triggers is setup as mentioned above.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Douglas Hammond

Wednesday 19 August 2009 8:15:04 am

If I read this right ot get publish_date and unpublish_date to work as expected I have to set this up after installing? It is not setup by default?

Seems odd.

Anyways to do so I would have to add a Event/Wait workflow for each class that has publish_date like the folder and article class. Then add them to the before publish trigger?

Also make sure that the classes and root nodes are entered in content.ini?

Are there are tutorials on how to do this right?

Auto publishing and unpublishing is a big deal to myself and I believe others.

Douglas Hammond

Thursday 20 August 2009 6:12:30 am

Can sombody confirm these are the correct steps.

First create a workflow

Event/Wait until date
Publish date will not be modified.
Folder Publish date
Article Publish date
Article (main-page) Publish date

Then add the workfow to the trigger before publish

Then in content.ini.append.php

[UnpublishSettings]
RootNodeList[]=2
ClassList[]=1
ClassList[]=16
ClassList[]=17

eZ debug

Timing: Jan 18 2025 22:09:57
Script start
Timing: Jan 18 2025 22:09:57
Module start 'content'
Timing: Jan 18 2025 22:09:58
Module end 'content'
Timing: Jan 18 2025 22:09:58
Script end

Main resources:

Total runtime0.8329 sec
Peak memory usage4,096.0000 KB
Database Queries204

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.8359180.8438
Module start 'content' 0.00560.6938 769.6797640.4063
Module end 'content' 0.69940.1334 1,410.0859337.0703
Script end 0.8328  1,747.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4535210.0002
Check MTime0.00140.1633210.0001
Mysql Total
Database connection0.00070.079310.0007
Mysqli_queries0.750890.14502040.0037
Looping result0.00190.23112020.0000
Template Total0.801596.220.4007
Template load0.00180.221320.0009
Template processing0.799696.009420.3998
Template load and register function0.00020.026210.0002
states
state_id_array0.00110.126710.0011
state_identifier_array0.00100.125620.0005
Override
Cache load0.00160.1925370.0000
Sytem overhead
Fetch class attribute can translate value0.00200.236250.0004
Fetch class attribute name0.00090.107870.0001
XML
Image XML parsing0.00140.173650.0003
class_abstraction
Instantiating content class attribute0.00000.001470.0000
General
dbfile0.01261.5171340.0004
String conversion0.00000.000630.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs