This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Setup & design » Why does my fetch not work?
expandshrink

Why does my fetch not work?

Why does my fetch not work?

Tuesday 27 January 2004 10:41:41 pm - 9 replies

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?

Tuesday 27 January 2004 11: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'

Wednesday 28 January 2004 8:02:10 am

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.

Wednesday 28 January 2004 8:42:50 am

Did you check user rights for your class ?

Wednesday 28 January 2004 9: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.

Wednesday 28 January 2004 10:08:24 am

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

Wednesday 28 January 2004 10: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.

Wednesday 28 January 2004 11: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

Wednesday 28 January 2004 11: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?

Wednesday 28 January 2004 12:35:54 pm

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

claus

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from