filter attributes fetch doesn't work in 3.2

Author Message

Jerry Jalava

Thursday 21 August 2003 3:58:41 pm

Hi,

Just discovered that the fetching with filtering attributes is broken...

This is what I get in debug:
Query error: Unknown table 'a0' in where clause. Query: SELECT ezcontentobject.*,
ezcontentobject_tree.*,
ezcontentclass.name as class_name
, ezcontentobject_name.name as name, ezcontentobject_name.real_translation
FROM
ezcontentobject_tree,
ezcontentobject,ezcontentclass
, ezcontentobject_name

, ezcontentobject_attribute as a1

WHERE
path_string like '/1/2/50/%' and depth <= 3 and


a0.contentobject_id = ezcontentobject.id AND
a0.contentclassattribute_id = 276 AND
a0.version = ezcontentobject_name.content_version AND a1.version = ezcontentobject_name.content_version AND ( a0.sort_key_int = '1' OR a1.sort_key_int = '1' ) AND
ezcontentclass.version=0 AND
node_id != 50 AND
ezcontentobject_tree.contentobject_id = ezcontentobject.id AND
ezcontentclass.id = ezcontentobject.contentclass_id AND

ezcontentobject_tree.contentobject_is_published = 1
and ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
ezcontentobject_name.content_translation = 'eng-GB'
ORDER BY path_string ASC

I checked the code and somehow it mixes the "$filterCount" variable or "$attributeJoinCount"... I think... :)

Is there any fix for that? Or is it working on someone?
I got it almoust working when I changed one line in the code, but at the same time it suddenly created infinite loop... ;)

Should I post this as an Bug also??

Thanks,
Jerry

Jerry Jalava

Monday 25 August 2003 9:12:49 pm

In the documentation there reads that the sort_by doesn't work with all datatypes... What are the datatypes that it works with??

I tried this with every datatype, but still nothing... I always get the same error.

This sorting opportunity was one thing why I changed my development site to 3.2... And then it doesn't work at all... (I know it's beta, but still.) ;)

Regards,
Jerry

Selmah Maxim

Wednesday 27 August 2003 6:57:10 am

I got this bug since few day, i had reported in bug section (the a0 is not defined as table alias ), also the sort by class attribute buged, and u cann`t pass the vars from the fetch to the php code such :

FirstAds=fetch('content','list',hash(parent_node_id,$node.node_id,
class_filter_type, "include",
class_filter_array, array($CompanyDataClassID),
attribute_filter,
array( 'and', array( 207, '=', '1' ),
array( 159, '=', '1' ) )
))

the $CompanyDataClassID come empty in the dubeg !

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.