Forums / Developer / Error: eZContentObject::fetch(): Object not found

Error: eZContentObject::fetch(): Object not found

Author Message

Dominik Pich

Thursday 18 December 2003 12:51:59 am

Why does this NOT work
{let menuitem=fetch('content', object, hash(object_id, 46))}
while this does:
{let children_count=fetch('content',list_count,hash(parent_node_id,46))

Olav Lillebø

Thursday 18 December 2003 1:54:44 am

Suggestion. If it is node_id 46 you are interested in, it's object_id is probably not 46. You can try {$node|attribute(show)}

 

Gunnstein Lye

Thursday 18 December 2003 2:38:56 am

Yup, nodes and objects are not the same. The object is the collection of attributes, and the node is a placement in the tree. They usually have different IDs. You can see the object id for instance in the edit link.

Dominik Pich

Thursday 18 December 2003 2:47:45 am

First, thank you both for your fast replies.
Ill check your solutions now.

One more question though... can object_ids and node_ids equal? For some IDs it even works.

Gunnstein Lye

Thursday 18 December 2003 2:54:57 am

Yes, they can be equal, but that's just coincidence.

Dominik Pich

Thursday 18 December 2003 3:16:11 am

//node_id used
{let menuitem=fetch('content', object, hash(object_id, 45))}
{node_view_gui view=menu content_node=$menuitem element_id="carlton" element_name="menu"}
{/let}

//object_id used
{let menuitem=fetch('content', object, hash(object_id, 42))}
{node_view_gui view=menu content_node=$menuitem element_id="carlton" element_name="menu"}
{/let}

// FOR THE ABOVE NODE_ID WORKS

in menu.tpl as called by node_view gui
$node.id = ID from above
{let children_count=fetch('content',list_count,hash(parent_node_id,$node.id))}
if node_id count > 0 else count == 0

Gunnstein Lye

Thursday 18 December 2003 4:04:18 am

When you use fetch('content', object, hash(object_id,xx)) then xx MUST be an object id.
When you use node_view_gui, you MUST supply a node. $menuitem is a content object in this case. This should work:
{node_view_gui view=menu content_node=$menuitem.main_node ...

fetch('content',list_count,hash(parent_node_id,$node.id))
$node.id will not work. Use $node_id or $node.node_id, depending on your template code.

Dominik Pich

Thursday 18 December 2003 4:27:51 am

The difference between a node and an object wasnt clear to me. I now use the func. 'node' to which I pass node_id and later on, $node.node_id

It isnt clear to me at all why some did work before but now all do.

Thank you

Balazs Halasy

Thursday 18 December 2003 4:35:12 am

Regarding the difference between objects and nodes, please read the docs:

http://ez.no/developer/ez_publish_3/documentation/ez_publish_basics/content_management_in_ez_publish/objects_nodes_and_the_content_node_tree

Balazs

eZ debug

Timing: Jan 18 2025 14:55:45
Script start
Timing: Jan 18 2025 14:55:45
Module start 'content'
Timing: Jan 18 2025 14:55:46
Module end 'content'
Timing: Jan 18 2025 14:55:46
Script end

Main resources:

Total runtime1.2739 sec
Peak memory usage4,096.0000 KB
Database Queries216

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 587.8438180.8125
Module start 'content' 0.00531.0823 768.6563654.3750
Module end 'content' 1.08760.1863 1,423.0313340.4297
Script end 1.2739  1,763.4609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2803210.0002
Check MTime0.00140.1063210.0001
Mysql Total
Database connection0.00060.046510.0006
Mysqli_queries1.188893.31362160.0055
Looping result0.00210.16822140.0000
Template Total1.244997.720.6225
Template load0.00200.159620.0010
Template processing1.242997.561320.6214
Template load and register function0.00010.008310.0001
states
state_id_array0.00140.110410.0014
state_identifier_array0.00100.078620.0005
Override
Cache load0.00180.1430500.0000
Sytem overhead
Fetch class attribute can translate value0.00090.074550.0002
Fetch class attribute name0.00110.0875110.0001
XML
Image XML parsing0.00140.111750.0003
class_abstraction
Instantiating content class attribute0.00000.0023130.0000
General
dbfile0.00630.4969330.0002
String conversion0.00000.000430.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs