Forums / Developer / Unpublish script in cronjobs folder

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

eZ debug

Timing: Jan 30 2025 19:34:17
Script start
Timing: Jan 30 2025 19:34:17
Module start 'content'
Timing: Jan 30 2025 19:34:17
Module end 'content'
Timing: Jan 30 2025 19:34:17
Script end

Main resources:

Total runtime0.3240 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 587.9531370.2891
Module start 'content' 0.00760.0155 958.24221,009.6563
Module end 'content' 0.02300.3009 1,967.89843,893.5859
Script end 0.3239  5,861.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00471.4497200.0002
Check MTime0.00140.4247200.0001
Mysql Total
Database connection0.00100.302110.0010
Mysqli_queries0.221868.45691410.0016
Looping result0.00160.48411390.0000
Template Total0.300492.710.3004
Template load0.00100.297210.0010
Template processing0.299492.415310.2994
Override
Cache load0.00060.199010.0006
Sytem overhead
Fetch class attribute can translate value0.00190.599610.0019
XML
Image XML parsing0.00030.098510.0003
General
dbfile0.00742.2707200.0004
String conversion0.00000.001030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs