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

          Nuno Oliveira (Inactive) created issue -
          Nuno Oliveira (Inactive) made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10037 ]
          Paulo Lopes (Inactive) made changes -
          Status Confirmed [ 10037 ] InputQ [ 10001 ]
          Gunnstein Lye logged work - 08/May/14 8:56 AM
          • Time Spent:
            30 minutes
             

            .

          Gunnstein Lye made changes -
          Assignee Gunnstein Lye [ gunnstein.lye@ez.no ]
          Gunnstein Lye made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Hide
          Gunnstein Lye added a comment -
          Show
          Gunnstein Lye added a comment - Pull request: https://github.com/ezsystems/ezpublish-legacy/pull/953
          Gunnstein Lye made changes -
          Status Development [ 3 ] Development review [ 10006 ]
          Gunnstein Lye made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 30 minutes [ 1800 ]
          Worklog Id 48081 [ 48081 ]
          Show
          André Rømcke added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-legacy/commit/8e16087e0335e1054824baf8f03ab5304517cc2d
          André Rømcke made changes -
          Status Development review [ 10006 ] Development Review done [ 10028 ]
          Affects Version/s 5.3-dev [ 12979 ]
          Fix Version/s 5.3 [ 11282 ]
          André Rømcke made changes -
          Status Development Review done [ 10028 ] Documentation done [ 10011 ]
          Fix Version/s 5.2 Maintenance [ 12782 ]
          Pedro Resende (Inactive) made changes -
          Status Documentation done [ 10011 ] QA [ 10008 ]
          Assignee Gunnstein Lye [ gunnstein.lye@ez.no ] Pedro Resende [ pedro.resende@ez.no ]
          Hide
          Pedro Resende (Inactive) added a comment -

          Tested and approved by Q.A.

          Show
          Pedro Resende (Inactive) added a comment - Tested and approved by Q.A.
          Pedro Resende (Inactive) made changes -
          Assignee Pedro Resende [ pedro.resende@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Pedro Resende (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Pedro Resende (Inactive) made changes -
          Time Spent 30 minutes [ 1800 ] 3 hours, 30 minutes [ 12600 ]
          Worklog Id 48143 [ 48143 ]
          Pedro Resende (Inactive) made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Pedro Resende (Inactive) logged work - 13/May/14 7:06 PM
          • Time Spent:
            3 hours
             

            Worked on Story

          Yannick Roger (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Assignee Yannick Roger [ yannick.roger@ez.no ]
          Yannick Roger (Inactive) made changes -
          Status Reopened [ 4 ] InputQ [ 10001 ]
          Yannick Roger (Inactive) made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Yannick Roger (Inactive) made changes -
          Status Development [ 3 ] Development review [ 10006 ]
          Affects Version/s 5.1 [ 11280 ]
          Fix Version/s 5.1 Maintenance [ 12301 ]
          Yannick Roger (Inactive) made changes -
          Status Development review [ 10006 ] Development Review done [ 10028 ]
          Yannick Roger (Inactive) made changes -
          Status Development Review done [ 10028 ] Documentation done [ 10011 ]
          Sarah Haïm-Lubczanski (Inactive) made changes -
          Link This issue discovered while testing EZP-23220 [ EZP-23220 ]
          Rui Silva (Inactive) made changes -
          Status Documentation done [ 10011 ] QA [ 10008 ]
          Assignee Yannick Roger [ yannick.roger@ez.no ] Rui Silva [ rui.silva@ez.no ]
          Hide
          Rui Silva (Inactive) added a comment -

          QA approved.

          Show
          Rui Silva (Inactive) added a comment - QA approved.
          Rui Silva (Inactive) made changes -
          Assignee Rui Silva [ rui.silva@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Rui Silva (Inactive) logged work - 16/Sep/14 7:55 PM
          • Time Spent:
            4 hours
             

            tested and closed

          Rui Silva (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Rui Silva (Inactive) made changes -
          Time Spent 3 hours, 30 minutes [ 12600 ] 7 hours, 30 minutes [ 27000 ]
          Worklog Id 50634 [ 50634 ]
          Rui Silva (Inactive) made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          André Rømcke made changes -
          Workflow eZ Engineering Scrumban Workflow [ 63114 ] EZ* Development Workflow [ 85019 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 85019 ] EZEE Development Workflow [ 123789 ]
          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