Forums / Install & configuration / Problem with collaboration cronjobs

Problem with collaboration cronjobs

Author Message

Michele Paoli

Monday 06 September 2010 1:34:08 am

I set up an installation of EzPublish 4.3 with a workflow to approve user registration.

To do this I configure a crontab, but if my admin user doesn't approve Item and delete it the cronjobs goes to crash with this message:

Fatal error: Call to a member function contentAttribute() on a non-object in /var/www/vhosts/technolift.com/httpdocs/kernel/classes/collaborationhandlers/ezapprove/ezapprovecollaborationhandler.php on line 107

I solved this problem patching ezapprovecollaborationhandler.php by inserting a control on static function contentObjectVersion( $collaborationItem ) :

from this:
static function contentObjectVersion( $collaborationItem ) {
$contentObjectID = $collaborationItem->contentAttribute( 'content_object_id' ); $contentObjectVersion = $collaborationItem->contentAttribute( 'content_object_version' );
return eZContentObjectVersion::fetchVersion( $contentObjectVersion, $contentObjectID );
}

to:

static function contentObjectVersion( $collaborationItem ) {
if(!empty($collaborationItem)) {
$contentObjectID = $collaborationItem->contentAttribute( 'content_object_id' ); $contentObjectVersion = $collaborationItem->contentAttribute( 'content_object_version' );
return eZContentObjectVersion::fetchVersion( $contentObjectVersion, $contentObjectID );
}
}

I'm sorry for my english...
Bye
Michele

Chen Xiongjie

Monday 06 September 2010 2:32:06 am

Hello Michele,

Can I have a question first: how did you delete the item? As far as I know normally you can not see the item before it's published.

Chen

eZ Comments: http://projects.ez.no/ezcomments
twitter: http://twitter.com/xiongjie

Michele Paoli

Tuesday 07 September 2010 1:09:04 am

The same thing that I ask to my customer.
i don't know how, but I found it deleted and crontab send me a lot of email with the classic message "Ez Publish get abrutly ended....", so comparing ezuser table with ezcontentobject and ez collaborationitem tables i found that an item in ezuser table was missed.

Michele

Chen Xiongjie

Tuesday 07 September 2010 2:17:01 am

OK.

As I know there are many cases which can result in this kind of fatal error. For example, deleting parent node(seemly not the case of deleting a pending user), or deleting an object which is in workflow pending after editing (it might happen here, but that's not for user registration).

The right solution should be not permitting user to delete it when there is object in workflow pending.

Related issue: http://issues.ez.no/IssueView.php?Id=6380

Feel free to have comment on that issue if you find something useful :).

Chen

eZ Comments: http://projects.ez.no/ezcomments
twitter: http://twitter.com/xiongjie

Michele Paoli

Tuesday 07 September 2010 5:33:22 am

Sure my customer cannot delete parent node.

i need more time to investigate.
Thank you a lot Chen.

Bye

eZ debug

Timing: Jan 30 2025 21:10:10
Script start
Timing: Jan 30 2025 21:10:10
Module start 'content'
Timing: Jan 30 2025 21:10:10
Module end 'content'
Timing: Jan 30 2025 21:10:10
Script end

Main resources:

Total runtime0.3062 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.0086 588.0547370.2813
Module start 'content' 0.00860.0144 958.33591,005.5781
Module end 'content' 0.02300.2832 1,963.91413,895.9922
Script end 0.3062  5,859.9063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00431.4164200.0002
Check MTime0.00140.4653200.0001
Mysql Total
Database connection0.00070.242310.0007
Mysqli_queries0.212369.31951410.0015
Looping result0.00140.45591390.0000
Template Total0.282892.310.2828
Template load0.00080.270310.0008
Template processing0.282092.069410.2820
Override
Cache load0.00060.192910.0006
Sytem overhead
Fetch class attribute can translate value0.00160.513010.0016
XML
Image XML parsing0.00030.085910.0003
General
dbfile0.01053.4277200.0005
String conversion0.00000.001630.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.0001 secs