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

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 15:52:18
Script start
Timing: Jan 18 2025 15:52:18
Module start 'layout'
Timing: Jan 18 2025 15:52:18
Module start 'content'
Timing: Jan 18 2025 15:52:18
Module end 'content'
Timing: Jan 18 2025 15:52:18
Script end

Main resources:

Total runtime0.5334 sec
Peak memory usage4,096.0000 KB
Database Queries82

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 587.9141152.6250
Module start 'layout' 0.00500.0030 740.539139.4453
Module start 'content' 0.00810.5240 779.9844649.9297
Module end 'content' 0.53200.0013 1,429.914116.1641
Script end 0.5333  1,446.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.6161160.0002
Check MTime0.00140.2594160.0001
Mysql Total
Database connection0.00080.145910.0008
Mysqli_queries0.473288.7160820.0058
Looping result0.00070.1312800.0000
Template Total0.503894.520.2519
Template load0.00210.385920.0010
Template processing0.501794.068920.2509
Template load and register function0.00020.034110.0002
states
state_id_array0.00140.255610.0014
state_identifier_array0.00120.218820.0006
Override
Cache load0.00190.3472650.0000
Sytem overhead
Fetch class attribute can translate value0.00050.086440.0001
Fetch class attribute name0.00110.1999100.0001
XML
Image XML parsing0.00050.088140.0001
class_abstraction
Instantiating content class attribute0.00000.0030100.0000
General
dbfile0.00070.1231100.0001
String conversion0.00000.001340.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
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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 41
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs