Forums / Developer / Unpublish by date?
Arash Molavi
Monday 01 December 2003 3:23:04 pm
I wounder if there is some way to unpublish an object in a spesific day. (ie. I've added an datehandeler in all articles, folders etc.)
Jo Henrik Endrerud
Tuesday 02 December 2003 6:21:36 am
Yes it is. To do this you need to create a new workflow. This workflow should have two events. First event should be "wait until date". On this event you should select all "unpublish time" attributes on your classes (select first class, click "load attributes", select unpublish attribute, click "new entry". Repeat for all classes with this attribute).
Second event should be "unpublish". Save your workflow and set this up to be triggered after publish of content.
This requires the cron-job to run correctly on the server.
Jo Henrik Endrerud | System Developer @ Seeds Consulting | http://www.seeds.no
John Smith
Monday 21 March 2005 9:33:20 am
Can anybody please tell where is the unpublished event in ezpublish 3.5.1. I can't find any such event there.
cheers
Christiane Kloss
Tuesday 22 March 2005 3:04:39 am
Hi,
Unpublish is a standard cronjob since 3.4(?).
There are some UnpublishSettings in content.ini:Copy to content.ini.append...
[UnpublishSettings] RootNodeList[]ClassList[]
The classes to be unpublished have to have a datefield named 'unpublish_date'.
Hope this will help.Lately there was a thread in the forum, but I can't find it right now.
Christiane
Tuesday 22 March 2005 3:26:14 am
hi Christiane,
the lines which you told are already in the content.ini. I am really stuck. Can you help.
What i did, i created a "wait untill event", selected the article class and the new attribute "Unpublish Date". After saving, i assigned the new workflow to the "after publish" trigger.
Run the cronjob manually.
It that right or i am wrong somewhere.
Cheers.
Bjarte Lunde
Wednesday 06 April 2005 5:39:49 am
I've added the unpublish_date attribute to the Article class and added the lines to content.ini.append in the siteaccess settings.
But when i run the cronjob i get this error:
Running cronjobs/unpublish.php
Fatal error: [] operator not supported for strings in /opt/ezpublish/sites/mysite/lib/ezutils/classes/ezini.php on line 638
Fatal error: eZ publish did not finish its request
Wednesday 06 April 2005 7:30:28 am
What sort of ezpublish version you using?
Thursday 07 April 2005 2:10:50 am
Version: 3.5.0 or 3.5.1