Anyone else getting Fatal error in kernel/content/copy.php ?

Author Message

Rainer Krauss

Thursday 27 August 2009 8:05:41 am

Dear all,

I've got objects that are published at several different locations.

When I click on their copy button in the list of sub items of an object in the admin view, I get:

Fatal error: Call to a member function attribute() on a non-object in /www/cdu-phc/kernel/content/copy.php on line 155

Is anybody else experiencing this problem (as in could this be a bug)? - using eZ 4.1.0 here.

Best wishes,
Rainer

André R.

Thursday 27 August 2009 8:53:33 am

Whats on that line? (there is nothing at that line in 4.1.4 in svn)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Rainer Krauss

Friday 28 August 2009 12:56:45 am

Thanks for asking, Andre.

In /www/cdu-phc/kernel/content/copy.php on line 155 is:

    $sourceParentNodeID = $node->attribute( 'parent_node_id' );

which is part of

 function browse( $Module, $object )

where $node is just the main_node of $object

In 4.1.4 it's line 157 and the browse function has not changed.

Best wishes,
Rainer

André R.

Friday 28 August 2009 4:40:41 am

So you have some db inconsistency then, since the object you are referring to doesn't have a valid main_node.

Try to echo the object id before that line using:

if ( !$node instanceof eZContentObjectTreeNode )
    echo 'object_id: ' . $objectID;

and check the database using:

SELECT *
FROM `ezcontentobject_tree`
WHERE `contentobject_id` =<object_Id>

And pay especially attention to "main_node_id", it should be same value on all.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 11:42:18
Script start
Timing: Jan 18 2025 11:42:18
Module start 'layout'
Timing: Jan 18 2025 11:42:18
Module start 'content'
Timing: Jan 18 2025 11:42:19
Module end 'content'
Timing: Jan 18 2025 11:42:19
Script end

Main resources:

Total runtime1.3204 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0096 588.1641152.6563
Module start 'layout' 0.00960.0038 740.820339.5078
Module start 'content' 0.01341.3053 780.3281554.1797
Module end 'content' 1.31870.0017 1,334.507812.0938
Script end 1.3204  1,346.6016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.3357160.0003
Check MTime0.00210.1553160.0001
Mysql Total
Database connection0.00150.115810.0015
Mysqli_queries1.258195.2824600.0210
Looping result0.00120.0883580.0000
Template Total1.276596.720.6382
Template load0.00330.252720.0017
Template processing1.273196.419920.6366
Template load and register function0.00010.010810.0001
states
state_id_array0.00120.091010.0012
state_identifier_array0.00210.159620.0011
Override
Cache load0.00290.2221310.0001
Sytem overhead
Fetch class attribute can translate value0.00120.088820.0006
Fetch class attribute name0.00110.086750.0002
XML
Image XML parsing0.00060.047820.0003
class_abstraction
Instantiating content class attribute0.00000.001060.0000
General
dbfile0.00140.1057170.0001
String conversion0.00000.000940.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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/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: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs