Forums / General / fetch with attribute_filter does not work?

fetch with attribute_filter does not work?

Author Message

D J

Friday 07 April 2006 12:16:51 am

I have class with attributes:

title [text line]
description [text block]

and object with data title - "TITL" and description "desc"

I try to fetch data in template:

    {$list=fetch(content, list, hash(parent_node_id, 666, attribute_filter, array(array( "myclass/title", "=", "TITL")}

This fetch does not return any results. W/o attribute filter i get my object. when i try to put filter criteria in lowecase ("titl") I also GET results, though my title is in UPPERCASE. Why?

Also, o I try to use same syntax to filter by description, but I cannot get any results. Is it posible to filter by text block?

Ɓukasz Serwatka

Friday 07 April 2006 12:22:21 am

You have syntax error in your tpl code:

{def $list=fetch( content, list, hash( parent_node_id, 666, 
                                                   attribute_filter, array( array( "myclass/title", "=", "TITL") ) ) )}

Also good idea is to enable debug output when you doing changes in templates.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

D J

Friday 07 April 2006 12:47:24 am

No, I do no have error in my template (that's only post error), and I have enabled debug output (which is pretty bad - too less usefull information and lot of obscure error mesages (like "atrribute filter returned false", which I get in my case). Try again :)

Nabil Alimi

Tuesday 18 April 2006 4:34:00 am

Clear cache manually.

Remove <b>var/plain/cache</b> (notice that this path may be different if in your site.ini you've specified a different value for [FileSettings] VarDir=var/plain )
and <b>var/cache</b>.

That should solve the problem.

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr