Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.1, 5.2, 5.3-dev
-
None
Description
The following MySQL error is generated when using eZContentStructureTreeOperator::subTree:
Query error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( ezcontentobject_name. language_id & ezcontentobject.language_mask > 0 AND ' at line 26 SELECT ezcontentobject.*, ezcontentobject_tree.*, 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 INNER JOIN ezcontentobject ON (ezcontentobject.id = ezcontentobject_tree.contentobject_id) INNER JOIN ezcontentclass ON (ezcontentclass.id = ezcontentobject.contentclass_id) INNER JOIN ezcontentobject_name ON ( ezcontentobject_name.contentobject_id = ezcontentobject_tree.contentobject_id AND ezcontentobject_name.content_version = ezcontentobject_tree.contentobject_version ) WHERE ezcontentobject_tree.parent_node_id = 2 and ezcontentclass.version=0 AND ezcontentobject_tree.contentobject_is_published = 1 ( ezcontentobject_name.language_id & ezcontentobject.language_mask > 0 AND ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 1 ) + ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 8 ) >> 2 ) + ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 4 ) ) + ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 2 ) << 2 ) < ( ezcontentobject_name.language_id & 1 ) + ( ( ezcontentobject_name.language_id & 8 ) >> 2 ) + ( ( ezcontentobject_name.language_id & 4 ) ) + ( ( ezcontentobject_name.language_id & 2 ) << 2 ) ) AND ezcontentobject_tree.is_invisible = 0 ORDER BY ezcontentobject.published ASC
h4: Steps to reproduce:
1. Create a legacy module with the following code:
$nodeID = 2; $eZContentStructureTreeOperator = new eZContentStructureTreeOperator(); $params = array( 'FetchHidden' => false, 'SortBy' => array( 'published', true ), 'ClassFilterType' => 'include', 'ClassFilterArray' => array( 'image' ) ); $eintragArray = $eZContentStructureTreeOperator->subTree( $params, $nodeID );
2. Enable SQL debug output;
3. Access to your legacy module's URL. The MySQL error listed above will be displayed.
Attachments
Issue Links
- discovered while testing
-
EZP-23220 Upgrade doc.ez.no eZ Publish to 5.1
- Closed