how to list subitems including objects added as subitems with 'add location'?

Author Message

marc marc

Wednesday 01 December 2010 9:03:40 am

hello eZcommunity,

when i list subitems of a node, it seems that objects that were added as subitems from 'add location' are not included in this list.

here is my code:

{def $videofiles=fetch( 'content', 'list',
        hash(    
        'parent_node_id',  $videoThema.node_id ,
        'limit',3,
        'main_node_only', false()
             ) 
    )
}

main_node_only changes nothing here, true or false.

What is the problem here, and how is it possible to list all objects without exclusion?

i search on forums and found only this topic but with no concrete answer:

http://share.ez.no/forums/general/object-relations-and-add-locations
thank you in advance for any help!

Daisy Radix

Wednesday 01 December 2010 11:08:05 am

Hello,

Can you try this and tell us if you have all your subitems?

{def $videofiles=fetch( 'content', 'list', 
                        hash( 'parent_node_id',  $videoThema.node_id  ) 
                        )
}

eZ Publish certified developper :http://auth.ez.no/certification/verify/378142

Bertrand Dunogier

Wednesday 01 December 2010 2:38:03 pm

Your problem here is that sub-items are at node level, and therefore only belong to ONE node:

- node A
- subitem 1
- subitem 2
- subitem 3
- node B
- node A (secondary location for node A)

When listing subitems for node B, the only REAL subitem will be node A, but this node A doesn't have sub-items. Node A, the main node, does...

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

marc marc

Thursday 02 December 2010 8:10:46 am

thank you for your answers

but meanwhile i found my error, it was a Section problem: i affected one Section for each folder and i didn't add all this sections to the Anonymous policies, so i couldn't see videos on my page added from other folders(sections).

thanks again

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

Main resources:

Total runtime0.6335 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.5313152.6875
Module start 'layout' 0.00480.0021 742.218839.5313
Module start 'content' 0.00690.6249 781.7500593.3047
Module end 'content' 0.63180.0017 1,375.054712.0625
Script end 0.6335  1,387.1172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4860160.0002
Check MTime0.00130.1977160.0001
Mysql Total
Database connection0.00070.114410.0007
Mysqli_queries0.581891.8328620.0094
Looping result0.00050.0858600.0000
Template Total0.605795.620.3028
Template load0.00220.351820.0011
Template processing0.603495.248520.3017
Template load and register function0.00040.055910.0004
states
state_id_array0.00070.116610.0007
state_identifier_array0.00210.324720.0010
Override
Cache load0.00180.2772320.0001
Sytem overhead
Fetch class attribute can translate value0.00060.101230.0002
Fetch class attribute name0.00120.186860.0002
XML
Image XML parsing0.00130.211230.0004
class_abstraction
Instantiating content class attribute0.00000.002160.0000
General
dbfile0.00110.1774220.0001
String conversion0.00000.001140.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
8content/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
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
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs