Author Topic

Kristof Coomans

Monday 22 May 2006 3:59:07 am

Comment46027

Hi Markko

I could locate the problem. The publish operation will call eZContentObjectTreeNode::removeSubtrees to remove nodes for which no node assignments exist any longer for the version we're publishing. That function will check if you have the right permissions to remove the node. But the cronjob is executed as the anonymous user, so probably you won't have the permission to do so and the node doesn't get removed.

You can add this at the beginning of your cronjob script to login as the admin user:

include_once( 'kernel/classes/datatypes/ezuser/ezuser.php' );
$user = eZUser::fetchByName('admin');
eZUser::setCurrentlyLoggedInUser( $user, $user->attribute( 'contentobject_id' ) );

This is probably an issue with the default ldapusermanage cronjob too. I will report it as a bug ( http://ez.no/bugs/view/8328 ).

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org