View Issue Details

IDProjectCategoryView StatusLast Update
13541Bug reports[All Projects] _ Unknownpublic2018-03-28 12:14
Reporterjosep Assigned Toollehar  
PrioritynoneSeveritymajor 
Status closedResolutionfixed 
Product Version3.3.x 
Target VersionFixed in Version3.5.x 
Summary13541: Error executing admin/checkintegrity
Description

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()

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.5.4+180320
I will donate to the project if issue is resolvedNo
BrowserFirefox ESR 52.7.2 (64 bits
Database & DB-Versionpostgresql-9.6 9.6.6-0+deb9u1
Server OS (if known)GNU Linux Debian 9.3
Webserver software & version (if known)apache2 2.4.25-3+deb9u3
PHP Versionphp7.0 7.0.27-0+deb9u1

Activities

ollehar

ollehar

2018-03-27 16:19

administrator   ~47233

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=26869

c_schmitz

c_schmitz

2018-03-28 12:14

administrator   ~47247

Version 3.6.0 released

Related Changesets

LimeSurvey: master 9330b1aa

2018-03-27 16:18:10

ollehar

Details Diff
Fixed issue 13541: Error executing admin/checkintegrity Affected Issues
13541
mod - application/controllers/admin/checkintegrity.php Diff File
mod - application/views/admin/checkintegrity/check_view.php Diff File

Issue History

Date Modified Username Field Change
2018-03-27 10:54 josep New Issue
2018-03-27 13:28 ollehar Assigned To => ollehar
2018-03-27 13:28 ollehar Status new => assigned
2018-03-27 16:19 ollehar Changeset attached => LimeSurvey master 9330b1aa
2018-03-27 16:19 ollehar Note Added: 47233
2018-03-27 16:19 ollehar Resolution open => fixed
2018-03-27 16:26 ollehar Status assigned => resolved
2018-03-27 16:26 ollehar Fixed in Version => 3.5.x
2018-03-28 12:14 c_schmitz Note Added: 47247
2018-03-28 12:14 c_schmitz Status resolved => closed