Details
-
Bug
-
Resolution: Duplicate
-
Medium
-
None
-
4.0.7, 4.1.4, 4.2.0
-
None
Description
The sql generated by ezContentFunctionCollection::fetchKeyword produces an Oracle error:
Error (1791): ORA-01791: cette expression n'a pas été SELECTionnée Failed query at offset 1217: SELECT DISTINCT substr( ezkeyword.keyword, 1, 10 ) AS keyword ,ezcontentobject_tree.node_id FROM ezkeyword, ezkeyword_attribute_link,ezcontentobject_tree,ezcontentobject,ezcontentclass , ezcontentobject_attribute a1 WHERE a1.version=ezcontentobject.current_version AND a1.contentobject_id=ezcontentobject.id AND ezkeyword.keyword LIKE 'conference%' AND ezcontentobject_tree.is_invisible = 0 AND ezkeyword.class_id IN ( 0 ) AND ezcontentobject_tree.parent_node_id = '0' AND ezcontentclass.version=0 AND ezcontentobject.status=1 AND ezcontentobject_tree.main_node_id=ezcontentobject_tree.node_id AND ezcontentobject_tree.contentobject_id = ezcontentobject.id AND ezcontentclass.id = ezcontentobject.contentclass_id AND a1.id=ezkeyword_attribute_link.objectattribute_id AND ezkeyword_attribute_link.keyword_id = ezkeyword.id ORDER BY ezcontentobject.published DESC Start of error: ezcontentobject.published DESC
The problem is: it is mandatory in oracle to add to the select list all fields used in order-by clauses.
Steps to reproduce
Just add a new 'keywords' block in a frontpage zone (tested on ezp 4.2) and the bad sql will be generated