Details
-
Bug
-
Resolution: Fixed
-
High
-
None
-
4.4.0
-
None
Description
When an object states related limitation is in place, the eztagcloud operator will generate a fatal SQL error:
Query error (1054): Unknown column 'ezkeyword_attribute_link.objectattribute_id' in 'on clause'. Query: SELECT ezkeyword.keyword, count(ezkeyword.keyword) AS keyword_count FROM ezkeyword, ezkeyword_attribute_link , ezcobj_state_link ezcobj_state_lnk_0_perm , ezcobj_state_group ezcobj_state_grp_0_perm , ezcobj_state ezcobj_state_0_perm LEFT JOIN ezcontentobject_attribute ON ezkeyword_attribute_link.objectattribute_id = ezcontentobject_attribute.id LEFT JOIN ezcontentobject ON ezcontentobject_attribute.contentobject_id = ezcontentobject.id LEFT JOIN ezcontentobject_tree ezco in /media/www/htdocs/3rdLine/issue5829/lib/ezdb/classes/ezmysqlidb.php on line 426
This comes from an optimization introduced in the operator code:
https://github.com/ezsystems/ezwebin/commit/f686fe0bf66d5cd0ac9e9bd46ddb6f4578c4c327, as well as changes in MySQL 5.0.12 regarding JOIN operators precedence in MySQL: http://dev.mysql.com/doc/refman/5.0/en/join.html.
Steps to reproduce
Add a custom object state group with 2 states. Modify the anonymous role so that only one of these states can be read (see screenshot).
Load the default ezflow frontpage (with tagcloud), or ezwebin's content/view/tagcloud/2, and the error should happen.