Bug in limiting results from fetching tree?

Author Message

Kjell Inge Sandvik

Thursday 08 September 2005 5:30:48 am

Hello

I have a code like this:

{def $bilder=fetch(content,tree,hash(parent_node_id,77, class_filter_type,include,class_filter_array,array('picture')),
limit,6, sort_by,array('published',false()))}

to loop through a content tree of pictures. The fetch should only get the 6 most recent additions, but instead it returns all! Is this a bug?

BTW: node-id 77 is the topnode of the tree.

Sandvik Web & Data

Kristof Coomans

Thursday 08 September 2005 6:05:07 am

I think there's a mistake in your template code. You've closed the hash with the parameters after array('picture'), but limit and sort_by should be keys inside the hash.

This is the right code:

{def $bilder=fetch(content,tree,hash(parent_node_id,77, class_filter_type,include,class_filter_array,array('picture'),
limit,6, sort_by,array('published',false())))}

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

Kjell Inge Sandvik

Thursday 08 September 2005 6:29:42 am

Ah of course! Thank you! My eyes did not notice that one :-)

Sandvik Web & Data

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 00:20:47
Script start
Timing: Jan 19 2025 00:20:47
Module start 'layout'
Timing: Jan 19 2025 00:20:47
Module start 'content'
Timing: Jan 19 2025 00:20:48
Module end 'content'
Timing: Jan 19 2025 00:20:48
Script end

Main resources:

Total runtime0.8886 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 588.0469152.6406
Module start 'layout' 0.00660.0030 740.687539.4766
Module start 'content' 0.00960.8776 780.1641539.2656
Module end 'content' 0.88720.0014 1,319.429712.1250
Script end 0.8886  1,331.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3934160.0002
Check MTime0.00130.1515160.0001
Mysql Total
Database connection0.00140.157810.0014
Mysqli_queries0.836594.1309570.0147
Looping result0.00070.0742550.0000
Template Total0.859096.720.4295
Template load0.00230.261320.0012
Template processing0.856796.404120.4283
Template load and register function0.00010.013210.0001
states
state_id_array0.00110.121410.0011
state_identifier_array0.00070.074220.0003
Override
Cache load0.00200.2250170.0001
Sytem overhead
Fetch class attribute can translate value0.00070.076120.0003
Fetch class attribute name0.00120.138750.0002
XML
Image XML parsing0.00090.104320.0005
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00080.0875220.0000
String conversion0.00000.001040.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/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
2content/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: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs