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.

eZ debug

Timing: Jan 18 2025 19:20:45
Script start
Timing: Jan 18 2025 19:20:45
Module start 'layout'
Timing: Jan 18 2025 19:20:45
Module start 'content'
Timing: Jan 18 2025 19:20:46
Module end 'content'
Timing: Jan 18 2025 19:20:46
Script end

Main resources:

Total runtime0.7536 sec
Peak memory usage4,096.0000 KB
Database Queries80

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 589.0547152.6250
Module start 'layout' 0.00800.0031 741.679739.4453
Module start 'content' 0.01110.7412 781.1250731.6563
Module end 'content' 0.75230.0012 1,512.781316.1563
Script end 0.7536  1,528.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4441160.0002
Check MTime0.00130.1787160.0001
Mysql Total
Database connection0.00080.111510.0008
Mysqli_queries0.688391.3415800.0086
Looping result0.00080.1117780.0000
Template Total0.721295.720.3606
Template load0.00210.273820.0010
Template processing0.719195.425720.3596
Template load and register function0.00020.026710.0002
states
state_id_array0.00140.179410.0014
state_identifier_array0.00060.084920.0003
Override
Cache load0.00180.2323460.0000
Sytem overhead
Fetch class attribute can translate value0.00130.177360.0002
Fetch class attribute name0.00150.2047100.0002
XML
Image XML parsing0.00150.202860.0003
class_abstraction
Instantiating content class attribute0.00000.0023100.0000
General
dbfile0.00140.1879220.0001
String conversion0.00000.001240.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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/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
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs