Unpublish script in cronjobs folder

Author Message

John Smith

Thursday 31 March 2005 7:45:29 am

Has anybody tested Unpublish script in cronjobs folder. Ezpublish version is 3.5.1. I am trying to unpublish the articles by date. It is working fine on my local server but the same thing is not working live. Can anybody help.

Cheers

Ralph Ekekihl

Thursday 31 March 2005 7:59:36 am

A little more info please,
What is happening on the live site?
What is the error message?

Contactivity B.V.
http://www.contactivity.com

John Smith

Thursday 31 March 2005 8:52:30 am

I have tested the unpublish.php.

I am not getting any sort of values from

$article =& $articleNodeArray[$key]->attribute( 'object' );
$dataMap =& $article->attribute( 'data_map' );
$dateAttribute =& $dataMap['unpublish_date'];

But on the local server i am getting values from the code written above.

Thanks for your kind reply.

Cheers.

John Smith

Monday 04 April 2005 10:45:17 am

Has anybody tested unpublish articles with dates on ezpublish 3.5.1?

In my case it is not happening.

I think it is a bug in version 3.5.1.

please help.

cheers

Bjarte Lunde

Tuesday 03 May 2005 4:26:40 am

I've upgraded to 3.5.2 and it works!
But does the unpublish cron-job delete the article?

Dan C

Saturday 23 July 2005 2:56:56 pm

I found that I had to modify unpunlish.php to get it to work properly.

The locale being used was eng-GB despite what was in my .ini files, so I had to add the locale to line 62 like so:

$rootNode =& eZContentObjectTreeNode::fetch( $nodeID,'eng-CA');

Then I had to add an extra empty Limitation filter so it would actually find my classes on line 64 like so:

$articleNodeArray =& $rootNode->subTree( array( 'Limitation' => array(),
                                                      'ClassFilterType' => 'include',
                                                      'ClassFilterArray' => $unpublishClasses ) );

And now it <b>seems</b> to be working flawlessly.

- Dan

Markus Freyt

Saturday 04 March 2006 12:58:32 pm

Hi, this also solves my local problem. But, the article disappears completely, when date in unpublish_date was relevant. The article ssems to be deleted also in the backend. I would like to set the article to hidden state instead. Any proposals ? Hope to get a quick answer. Many thanks.

laurent le cadet

Thursday 08 January 2009 2:59:01 am

Confirmation that adding...

$articleNodeArray =& $rootNode->subTree( <b>array( 'Limitation' => array(),</b>

makes also unpublish.php works with 3.10.0.
The file from the original distribution does not work without this 'Limitation'.

Thanks, Dan C, for the tip.

Laurent

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