Forums / Setup & design / fetching children of multiple nodes

fetching children of multiple nodes

Author Message

Marko Žmak

Friday 29 April 2005 4:42:09 pm

I wan't to supply fetch with an array of nodes, and get all the nodes that have a parent node in that array. How do I do that?

As far as I could find out, fetch allows to specify only one parent_node_id, how can I make it to use two or more parent node ids?

P.S. And I want to do it with only one fetch.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Michael Zeidler

Sunday 01 May 2005 12:21:05 pm

Hello Marco,

take a look at this bug I have commited today: http://ez.no/community/bugs/fetch_content_list_no_data_fetching_with_an_array_of_node_ids_for_parent_node_id
There you can also find this example:

{let id_array=array(174, 175)}
 {let fetched_array=fetch( 'content', 'list', hash( 'parent_node_id', $id_array ) )}
<br>HELP:{$fetched_array|attribute(show)}
 {/let}
{/let}

I use the 3.5 stable SVN-tree.

Additional related Links:
http://ez.no/community/bugs/problems_with_fetching_from_multiple_nodes
http://ez.no/community/forum/developer/fetching_content_from_multimple_nodes

-------------------------------------------------------------------------------------------
join #ezpublish on irc.freenode.org

Marko Žmak

Sunday 01 May 2005 3:49:27 pm

Hm... when did you report this bug and did you get any answers a bout it? I tried something similar in previos versions of eZ and it didn't work. I didn't see that part of documentation so I didn't think it was a bug.

It would be very nice to see this bug fixed...

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Michael Zeidler

Tuesday 03 May 2005 6:50:28 am

Hello Marko,

it seems that Jan has fixed the bug. But if you use the core 3.5 stable svn-repository its not commited there. But just have a look on the reported bug (http://ez.no/community/bugs/fetch_content_list_no_data_fetching_with_an_array_of_node_ids_for_parent_node_id). I have fixed the bug myself, which is explained.

Cheers

-------------------------------------------------------------------------------------------
join #ezpublish on irc.freenode.org

Frederik Holljen

Tuesday 03 May 2005 7:06:12 am

SEAwolfx,

The fix was commited in all active branches in svn. However, pubsvn is a copy of the master svn server and it is usually lagging a few hours. Just wait and the fix will show up.

Frederik

Marko Žmak

Tuesday 03 May 2005 3:42:43 pm

Great I can't wait to test it. Is this bugfix available in the standard tar.gz download (eZ publish distributions)?

Also is there a patch that can be applied to previous versions of eZ?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Michael Zeidler

Wednesday 04 May 2005 3:22:36 am

Either you follow my recommendations to fix the bug as given in the bug report (jan has done nearly the same, he uses "OR" an I use "||") or you have to use SVN to checkout the bleeding edge of development. ;)

Cheers!

-------------------------------------------------------------------------------------------
join #ezpublish on irc.freenode.org

eZ debug

Timing: Jan 20 2025 20:55:23
Script start
Timing: Jan 20 2025 20:55:23
Module start 'content'
Timing: Jan 20 2025 20:55:24
Module end 'content'
Timing: Jan 20 2025 20:55:24
Script end

Main resources:

Total runtime1.2368 sec
Peak memory usage4,096.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.8125180.8281
Module start 'content' 0.00611.0994 768.6406663.8281
Module end 'content' 1.10550.1312 1,432.4688341.0859
Script end 1.2367  1,773.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.2979210.0002
Check MTime0.00140.1150210.0001
Mysql Total
Database connection0.00060.050510.0006
Mysqli_queries1.137691.97522080.0055
Looping result0.00210.17242060.0000
Template Total1.209897.820.6049
Template load0.00220.176620.0011
Template processing1.207697.635520.6038
Template load and register function0.00010.007910.0001
states
state_id_array0.00080.066410.0008
state_identifier_array0.00110.088320.0005
Override
Cache load0.00180.1426390.0000
Sytem overhead
Fetch class attribute can translate value0.00120.095140.0003
Fetch class attribute name0.00140.1111100.0001
XML
Image XML parsing0.00350.282740.0009
class_abstraction
Instantiating content class attribute0.00000.0025140.0000
General
dbfile0.01160.9398410.0003
String conversion0.00020.014430.0001
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
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/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
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs