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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:23:20
Script start
Timing: Jan 18 2025 11:23:20
Module start 'layout'
Timing: Jan 18 2025 11:23:20
Module start 'content'
Timing: Jan 18 2025 11:23:20
Module end 'content'
Timing: Jan 18 2025 11:23:20
Script end

Main resources:

Total runtime0.5503 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 587.9063152.6250
Module start 'layout' 0.00490.0036 740.531339.4453
Module start 'content' 0.00850.5404 779.9766635.3281
Module end 'content' 0.54890.0014 1,415.304712.1641
Script end 0.5503  1,427.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5827160.0002
Check MTime0.00140.2563160.0001
Mysql Total
Database connection0.00050.089610.0005
Mysqli_queries0.492989.5579670.0074
Looping result0.00070.1187650.0000
Template Total0.517194.020.2585
Template load0.00190.342220.0009
Template processing0.515293.614620.2576
Template load and register function0.00020.027610.0002
states
state_id_array0.00160.282710.0016
state_identifier_array0.00080.136320.0004
Override
Cache load0.00160.2888370.0000
Sytem overhead
Fetch class attribute can translate value0.00070.125340.0002
Fetch class attribute name0.00100.175470.0001
XML
Image XML parsing0.00130.240840.0003
class_abstraction
Instantiating content class attribute0.00000.002470.0000
General
dbfile0.00110.1955230.0000
String conversion0.00000.002340.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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