ezcontentobject purge issue for objects with extra information (users binary files etc)

Author Message

Bruce Morrison

Monday 24 November 2003 7:19:47 pm

Hi all

While creating a custom datatype I found that the deleteStoredObjectAttribute method was not being called when the object was removed from the trash. Further investigation has shown that this is due to Line 904

$contentobjectAttributes =& $contentobject->attribute( 'contentobject_attributes' );

being commented out and replaced with

$contentobjectAttributes =& $contentobject->contentObjectAttributes( true, null, null, false, true );

The latter returns an empty array and results in deleteStoredObjectAttribute not being called for any contentObjectAttributes.

This means that the cleanup for datatypes with 'extra' information such as links,users, binary files etc is not completed.

Swapping these lines back fixes this issue.

This change seems to have been introduced in revision 3851, but there is no log entry to detail why.
http://pubsvn.ez.no/viewcvs/ezp//trunk/kernel/classes/ezcontentobject.php?rev=3851&view=markup

Cheers
Bruce
http://www.designit.com.au/

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Bruce Morrison

Monday 24 November 2003 7:23:04 pm

I'm a bit late
http://www.ez.no/developer/ez_publish_3/bug_reports/cleanup_error_in_contentobject_class

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

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 19 2025 01:00:14
Script start
Timing: Jan 19 2025 01:00:14
Module start 'layout'
Timing: Jan 19 2025 01:00:14
Module start 'content'
Timing: Jan 19 2025 01:00:15
Module end 'content'
Timing: Jan 19 2025 01:00:15
Script end

Main resources:

Total runtime0.7969 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0038 590.7813152.6875
Module start 'layout' 0.00380.0025 743.468839.5547
Module start 'content' 0.00640.7892 783.0234490.1797
Module end 'content' 0.79560.0012 1,273.203112.0625
Script end 0.7969  1,285.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3700160.0002
Check MTime0.00130.1602160.0001
Mysql Total
Database connection0.00040.048810.0004
Mysqli_queries0.751794.3353520.0145
Looping result0.00050.0626500.0000
Template Total0.768696.520.3843
Template load0.00180.224220.0009
Template processing0.766896.228120.3834
Template load and register function0.00010.012810.0001
states
state_id_array0.00100.124310.0010
state_identifier_array0.00110.132920.0005
Override
Cache load0.00150.1888210.0001
Sytem overhead
Fetch class attribute can translate value0.00060.074310.0006
Fetch class attribute name0.00130.157930.0004
XML
Image XML parsing0.00040.056210.0004
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00070.0864160.0000
String conversion0.00000.000640.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs