Forums / Setup & design / fetch_alias and Constant[attribute_filter]

fetch_alias and Constant[attribute_filter]

Author Message

Fabien Scantamburlo

Friday 11 April 2008 1:05:09 am

Hi,

I replaced the following fetch function :

{def $archived_news=fetch( 'content', 'list',
       hash( 'parent_node_id', ezini( 'SiteSettings', 'SubsiteRootNode', 'dnm_website.ini' ),
             'class_filter_type', 'include',
             'class_filter_array', array( 'news_text' ),
             'depth', '3',
             'sort_by', array( 'attribute', false(), 231 ),
             'attribute_filter', array( 'and',
                                        array( 231, '>', $archiveStartDate ),
                                        array( 231, '<', $archiveEndDate ),
                                        array( 263, '=', '1' ) ) ) )}

by a fetch_alias.

This following fetch_alias function is working :

{def $archived_news=fetch_alias( 'news_text_month_list',
                                                 hash( 'parent_node_id', ezini( 'SiteSettings', 'SubsiteRootNode', 'dnm_website.ini' ),
                                                          'attribute_filter', array( 'and',
                                        array( 231, '>', $archiveStartDate ),
                                        array( 231, '<', $archiveEndDate ),
                                        array( 263, '=', '1' ) ) ) )}

with the fetch_alias override :

[news_text_month_list]
Module=content
FunctionName=list
Constant[sort_by]=attribute;0;231
Constant[class_filter_type]=include
Constant[class_filter_array]=news_text
Constant[depth]=3

However, I need to export the attribute_filter

array( 263, '=', '1' )

to the override rule like something like that

Constant[attribute_filter]=263;=;1

But, i have this fatal error:

Fatal error: Cannot unset string offsets in /var/www/ezpublish-fabien/kernel/classes/ezcontentobjecttreenode.php on line 980
Fatal error: eZ Publish did not finish its request

The execution of eZ Publish was abruptly ended, the debug output is present below.

How can i do this override ?

Olivier Clavel

Monday 24 November 2008 1:49:22 am

Did you find any solution to this problem ? I'm trying to declare a constant attribute_filter on a fetch_alias as well. No success so far and no clue in any documentation.

Olivier Clavel - Kaliop Interactive Media
Silver Partner - http://www.kaliop.com