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

MySQL Query Error eZContentStructureTreeOperator::subTree

    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.

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Confirmed Confirmed
          3m 53s 1 nuno.oliveira@ez.no 07/May/14 6:35 PM
          Confirmed Confirmed InputQ InputQ
          52s 1 Paulo Lopes (Inactive) 07/May/14 6:36 PM
          Reopened Reopened InputQ InputQ
          7s 1 yannick.roger@ez.no 16/Sep/14 9:27 AM
          InputQ InputQ Development Development
          20h 7m 2 yannick.roger@ez.no 16/Sep/14 9:27 AM
          Development Development Development Review Development Review
          16m 15s 2 yannick.roger@ez.no 16/Sep/14 9:31 AM
          Development Review Development Review Development Review done Development Review done
          4d 22h 27m 2 yannick.roger@ez.no 16/Sep/14 9:31 AM
          Development Review done Development Review done Documentation Review done Documentation Review done
          7m 58s 2 yannick.roger@ez.no 16/Sep/14 9:31 AM
          Documentation Review done Documentation Review done QA QA
          4h 39m 2 rui.silva@ez.no 16/Sep/14 1:19 PM
          QA QA Closed Closed
          5h 53m 2 rui.silva@ez.no 16/Sep/14 4:42 PM
          Closed Closed Reopened Reopened
          127d 17h 47m 3 rui.silva@ez.no 18/Sep/14 5:56 PM
          Reopened Reopened Closed Closed
          0s 2 rui.silva@ez.no 18/Sep/14 5:56 PM

            People

            • Assignee:
              Unassigned
              Reporter:
              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