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

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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