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