Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22810

MySQL Query Error eZContentStructureTreeOperator::subTree

    XMLWordPrintable

    Details

      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

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nuno.oliveira-obsolete@ez.no Nuno Oliveira (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 7 hours, 30 minutes
                  7h 30m