After upgrade from 3.4.2+180223 to 3.5.4+180320 I try to Check Data Integrity and I have this error:
CDbCommand failed to execute the SQL statement: SQLSTATE[42803]: Grouping error: 7 ERROR: column "lime_groups.group_order" must appear in the GROUP BY clause or be used in an aggregate function
LINE 9: HAVING group_order != gid
^. The SQL statement executed was:
SELECT
sid,
COUNT(DISTINCT group_order) AS group_order,
COUNT(gid) AS gid
FROM
lime_groups
GROUP BY sid
HAVING group_order != gid
/var/www/html/limesurvey/framework/db/CDbCommand.php(543)
531 {
532 if($this->_connection->enableProfiling)
533 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534
535 $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536 $message=$e->getMessage();
537 Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539
540 if(YII_DEBUG)
541 $message.='. The SQL statement executed was: '.$this->getText().$par;
542
543 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545 }
546 }
547
548 /*
549 Builds a SQL SELECT statement from the given query specification.
550 @param array $query the query specification in name-value pairs. The following
551 query options are supported: {@link select}, {@link distinct}, {@link from},
552 {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553 {@link limit}, {@link offset} and {@link union}.
554 @throws CDbException if "from" key is not present in given query parameter
555 @return string the SQL statement
Stack Trace
#0
+
/var/www/html/limesurvey/framework/db/CDbCommand.php(396): CDbCommand->queryInternal("fetchAll", array(2), array())
#1
–
/var/www/html/limesurvey/application/controllers/admin/checkintegrity.php(873): CDbCommand->queryAll()
868 COUNT(gid) AS gid
869 FROM
870 {{groups}}
871 GROUP BY sid
872 HAVING group_order != gid";
873 $result = Yii::app()->db->createCommand($sQuery)->queryAll();
874 if (!empty($result)) {
875 foreach ($result as &$survey) {
876 $survey['organizerLink'] = Yii::app()->getController()->createUrl(
877 'admin/survey',
878 [
#2
–
/var/www/html/limesurvey/application/controllers/admin/checkintegrity.php(827): CheckIntegrity->checkGroupOrderDuplicates()
822 }
823
824 /**/
825 / Check group sort order duplicates /
826 /**/
827 $aDelete['groupOrderDuplicates'] = $this->checkGroupOrderDuplicates();
828
829 /**/
830 / Check question sort order duplicates /
831 /**/
832 $aDelete['questionOrderDuplicates'] = $this->checkQuestionOrderDuplicates();
#3
–
/var/www/html/limesurvey/application/controllers/admin/checkintegrity.php(40): CheckIntegrity->_checkintegrity()
35 Yii::app()->loadHelper('surveytranslator');
36 }
37
38 public function index()
39 {
40 $aData = $this->_checkintegrity();
41
42
43 $aData['fullpagebar']['returnbutton']['url'] = 'admin/index';
44 $aData['fullpagebar']['returnbutton']['text'] = gT('Return to admin home');
45
#4
unknown(0): CheckIntegrity->index()
#5
+
/var/www/html/limesurvey/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(CheckIntegrity, array())
#6
+
/var/www/html/limesurvey/application/core/Survey_Common_Action.php(83): CAction->runWithParamsInternal(CheckIntegrity, ReflectionMethod, array())
#7
+
/var/www/html/limesurvey/framework/web/CController.php(308): Survey_Common_Action->runWithParams(array())
#8
+
/var/www/html/limesurvey/framework/web/CController.php(286): CController->runAction(CheckIntegrity)
#9
+
/var/www/html/limesurvey/framework/web/CController.php(265): CController->runActionWithFilters(CheckIntegrity, array())
#10
+
/var/www/html/limesurvey/application/controllers/AdminController.php(158): CController->run("checkintegrity")
#11
+
/var/www/html/limesurvey/framework/web/CWebApplication.php(282): AdminController->run("checkintegrity")
#12
+
/var/www/html/limesurvey/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/checkintegrity")
#13
+
/var/www/html/limesurvey/framework/base/CApplication.php(185): CWebApplication->processRequest()
#14
+
/var/www/html/limesurvey/index.php(194): CApplication->run() |