Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
2013.1
-
None
-
debian 6, php 5.4, mysql5, ezcommunity 2013.1
Description
To reproduce, choose limitation on content/read policy : Group( Self )
(or States limitation for example)
When you use fetch_by_starrating with permission limitation, you have a SQL error :
"Query error (1054): Unknown column 'ezcontentobject.owner_id' in 'on clause'. Query: SELECT
ezcontentobject., ezcontentobject_tree.,
ezstarrating.rating_average as rating, ezstarrating.rating_count as rating_count,
ezcontentclass.serialized_name_list as class_serialized_name_list,
ezcontentclass.identifier as class_identifier,
ezcontentclass.is_container as is_container
, ezcontentobject_name.name as name, ezcontentobject_name.real_translation
FROM
ezcontentobject_tree,
ezcontentobject_tree owner_tree,
ezcontentclass
INNER JOIN ezcontentobject_name
LEFT JOIN ezgroup_perm_tmp_890 ON ezgroup_perm_tmp_890.user_id = ezcontentobject.owner_id"
For helping you, I have quickly changed the SQL query in ezsrRatingObject::fetchNodeByRating(), and pull a request on github : https://github.com/ezsystems/ezstarrating/pull/12
Thanks.