Forums / Setup & design / Why does my fetch not work?

Why does my fetch not work?

Author Message

Michel Houtermans

Tuesday 27 January 2004 1:41:41 pm

I have this setup.

Folder>
Object 1>
Object 1.1
Object 1.2

I created an override for the full.tpl to display Object 1. This works fine. But I also want to display in that template the contents of Object 1.1 and 1.2. And this I cannot get to work. I have the following:

{let children=fetch( content,
list,
hash( parent_node_id, $node.node_id,
sort_by, $node.sort_array,
class_filter_type, include,
class_filter_array, array( 'trade_note' )
)
)
}

bla 1

{* LOOP: For each child of the node... *}
{section name=Child loop=$children}

{* Display the content of the child using a line-view template. *}
{node_view_gui view=line content_node=$Child:item}

bla 2<hr>

{* End of loop. *}
{/section}

bla 3
{* End of namespace. *}
{/let}

Bla 1 and bla 3 get displayed but bla 2 does not get displayed. This means that somehow the fetch statement does not return any objects even though there are 2 objects.

Any clue what I am doing wrong?

Lazaro Ferreira

Tuesday 27 January 2004 2:36:18 pm

Hi,

Which class are your objects 1.1 and 1.2 ?, because your code "class_filter_type, include,
class_filter_array, array( 'trade_note' )" should only shows objects of class 'trade_note'

Lazaro
http://www.mzbusiness.com

Michel Houtermans

Tuesday 27 January 2004 11:02:10 pm

Both objects are of type trade_note, so that should be correct. But even if I take out the filter statement it does not return anything.

Sébastien Prud'homme

Tuesday 27 January 2004 11:42:50 pm

Did you check user rights for your class ?

Michel Houtermans

Wednesday 28 January 2004 12:07:09 am

yep, just checked it again. The trade_note class is in the standard rule for anonymous. But I think, even if the rule was wrong, should it not at least display 2x bla 2? So I think that is not it.

Sébastien Prud'homme

Wednesday 28 January 2004 1:08:24 am

Nope, $children is empty is the rights are not ok

Michel Houtermans

Wednesday 28 January 2004 1:28:27 am

Ok, I added all my classes to the rule. Now it looks like this:

Module Function Limitation
user login *
content read Class( Folder , Info page , Link , File , Comment ,
Security , Market , Trade , Trade Remark , Trade Action ,
Trade Account , Article , Trade Note , Image , Forum , Forum message )

This is the standard rule for Anonymous. But still it does not show anything.

Claus Jensen

Wednesday 28 January 2004 2:26:59 am

Hi,
Im experiencing the exact same thing and found that you sometimes have to log out and then log in again to see the changes. I think it has to do with session variables. However I do a similar fetch, and get "no access" when my user has access to some nodes and subtrees, but not all. I therefore assume it might be a bug in the system. Im running 3.2.4 and php 4.3.4, which version are you using?

regards,
claÜs

Michel Houtermans

Wednesday 28 January 2004 2:44:12 am

Waaa that did the trick. I logged in and out and it worked. Must be a bug. I run ez 3.3-2 and PHP Version: 4.3.2 (Zend: 1.3.0)

Now I can see my stuff. Very weird. I have another problem with the article class and images. I can add an image in the admin part but when I then want to see the article I get an error because of the image.

Fatal error: Call to undefined function: imageistruecolor() in /usr/local/www/vhosts/mydomain.com/htdocs/lib/ezimage/classes/ezimagegdhandler.php on line 703

Do you have this problem too?

Claus Jensen

Wednesday 28 January 2004 3:35:54 am

Nope, I use ImageMagick as imagehandler. Glad that you got a step further, that thing bothered me for a while too.

claus

eZ debug

Timing: Jan 18 2025 11:38:03
Script start
Timing: Jan 18 2025 11:38:03
Module start 'content'
Timing: Jan 18 2025 11:38:04
Module end 'content'
Timing: Jan 18 2025 11:38:04
Script end

Main resources:

Total runtime0.8243 sec
Peak memory usage4,096.0000 KB
Database Queries219

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.1250180.8359
Module start 'content' 0.00590.6673 769.9609655.0078
Module end 'content' 0.67320.1510 1,424.9688341.1641
Script end 0.8242  1,766.1328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.5115210.0002
Check MTime0.00150.1777210.0001
Mysql Total
Database connection0.00070.085410.0007
Mysqli_queries0.740089.77632190.0034
Looping result0.00250.29842170.0000
Template Total0.796196.620.3981
Template load0.00220.268520.0011
Template processing0.793996.309720.3969
Template load and register function0.00020.028910.0002
states
state_id_array0.00090.109710.0009
state_identifier_array0.00090.109820.0005
Override
Cache load0.00200.2382650.0000
Sytem overhead
Fetch class attribute can translate value0.00200.236650.0004
Fetch class attribute name0.00160.1929100.0002
XML
Image XML parsing0.00070.079550.0001
class_abstraction
Instantiating content class attribute0.00000.0030100.0000
General
dbfile0.00410.4947210.0002
String conversion0.00000.000530.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
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
19content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 41
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs