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

ezsurvey : Looking at the survey result generates a SQL error (postgres)

    Details

      Description

      To reproduce:

      1. Create a survey
      2. Submit a survey
      3. Click on the "Survey" tab in admin ( link: /survey/list/ ) 
      4. Click the "Results" icon on the left ( link: /survey/result/58/182/eng-GB )
      5. Click the "All evaluations" tab
      

      You'll then get the following SQL error:

      Warning: PHP: E_WARNING 	Feb 03 2012 15:31:29
      pg_query(): Query failed: ERROR:  column "ezsurveyresult.tstamp" must appear in the GROUP BY clause or be used in an aggregate function
      LINE 6: ...                  language_code='eng-GB' ORDER BY ezsurveyre...
                                                                   ^ in /var/www/ezp/.run/lib/ezdb/classes/ezpostgresqldb.php on line 202
       
      Error: eZPostgreSQLDB 	Feb 03 2012 15:31:29
      Error: error executing query: SELECT count( ezsurveyresult.id ) as count FROM
                               ezsurveyresult, ezsurvey WHERE
                               ezsurveyresult.survey_id=ezsurvey.id AND
                               contentclassattribute_id='182' AND
                               contentobject_id='58' AND
                               language_code='eng-GB' ORDER BY ezsurveyresult.tstamp DESC: ERROR:  column "ezsurveyresult.tstamp" must appear in the GROUP BY clause or be used in an aggregate function
      LINE 6: ...                  language_code='eng-GB' ORDER BY ezsurveyre...
                                                                   ^
      

        Issue Links

          Activity

          Hide
          Vidar Langseid added a comment -

          test cases failing due to this bug:
          tc-56_test_single_multichoice_attributes_with_extra_option.html
          tc-66_test_that_you_can_edit_an_survey_more_than_10_times_without_losing_results.html

          Show
          Vidar Langseid added a comment - test cases failing due to this bug: tc-56_test_single_multichoice_attributes_with_extra_option.html tc-66_test_that_you_can_edit_an_survey_more_than_10_times_without_losing_results.html
          Hide
          Gaetano Giunta added a comment -

          most likely affecting oracle too (is there not already an issue for it?)

          Show
          Gaetano Giunta added a comment - most likely affecting oracle too (is there not already an issue for it?)
          Hide
          Andrzej Longosz added a comment -

          This issue is related to eZ Publish and/or its extension(s) which is past EOM now. Closing.

          Show
          Andrzej Longosz added a comment - This issue is related to eZ Publish and/or its extension(s) which is past EOM now. Closing.

            People

            • Assignee:
              Unassigned
              Reporter:
              Vidar Langseid
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: