Description | CDbException
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'limesurvey.t.scope' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by. The SQL statement executed was: SELECT COUNT() FROM (SELECT FROM lime_assessments t WHERE sid=:ycp0 GROUP BY id) sq
/var/www/html/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/framework/db/CDbCommand.php(433): CDbCommand->queryInternal("fetchColumn", 0, array())
#1
+
/var/www/html/framework/db/ar/CActiveRecord.php(1609): CDbCommand->queryScalar()
#2
+
/var/www/html/framework/web/CActiveDataProvider.php(228): CActiveRecord->count(CDbCriteria)
#3
+
/var/www/html/framework/web/CDataProvider.php(224): CActiveDataProvider->calculateTotalItemCount()
#4
+
/var/www/html/framework/web/CActiveDataProvider.php(178): CDataProvider->getTotalItemCount()
#5
+
/var/www/html/framework/web/CDataProvider.php(168): CActiveDataProvider->fetchData()
#6
+
/var/www/html/framework/zii/widgets/CBaseListView.php(125): CDataProvider->getData()
#7
+
/var/www/html/framework/zii/widgets/grid/CGridView.php(339): CBaseListView->init()
#8
–
/var/www/html/application/extensions/bootstrap/widgets/TbGridView.php(44): CGridView->init()
39 /*
40 Initializes the widget.
41 */
42 public function init()
43 {
44 parent::init();
45 $classes = array('table');
46 if (isset($this->type) && !empty($this->type)) {
47 if (is_string($this->type)) {
48 $this->type = explode(' ', $this->type);
49 }
#9
+
/var/www/html/framework/web/CBaseController.php(147): TbGridView->init()
#10
+
/var/www/html/framework/web/CBaseController.php(181): CBaseController->createWidget("bootstrap.widgets.TbGridView", array("dataProvider" => CActiveDataProvider, "id" => "assessments-grid", "columns" => array(array("name" => "id", "filter" => false), array("name" => "buttons", "type" => "raw", "header" => "Action", "filter" => false), array("name" => "scope", "value" => "$data->scope == "G" ? eT("Global") : eT("Total")", "htmlOptions" => array("class" => "col-sm-1"), "filter" => "<select class="form-control" name="assessment["scope"]..."), array("name" => "name", "htmlOptions" => array("class" => "col-sm-2")), ...), "filter" => Assessment, ...))
#11
–
/var/www/html/application/views/admin/assessments/assessments_view.php(59): CBaseController->widget("bootstrap.widgets.TbGridView", array("dataProvider" => CActiveDataProvider, "id" => "assessments-grid", "columns" => array(array("name" => "id", "filter" => false), array("name" => "buttons", "type" => "raw", "header" => "Action", "filter" => false), array("name" => "scope", "value" => "$data->scope == "G" ? eT("Global") : eT("Total")", "htmlOptions" => array("class" => "col-sm-1"), "filter" => "<select class="form-control" name="assessment["scope"]..."), array("name" => "name", "htmlOptions" => array("class" => "col-sm-2")), ...), "filter" => Assessment, ...))
54 'itemsCssClass' => 'table table-responsive table-striped',
55 'htmlOptions'=>array('style'=>'cursor: pointer;', 'class'=>'hoverAction grid-view'),
56 'ajaxType' => 'POST',
57 'ajaxUpdate' => 'assessments-grid',
58 'template' => "{items}\n<div id='tokenListPager'><div class=\"col-sm-4\" id=\"massive-action-container\"></div><div class=\"col-sm-4 pager-container ls-ba \">{pager}</div><div class=\"col-sm-4 summary-container\">{summary}</div></div>",
59 'afterAjaxUpdate'=>'function(){ try{bindAction();} catch(e) {} }',
60 ));
61 ?>
62 </div>
63 </div>
64 <?php if ( Permission::model()->hasSurveyPermission($iSurveyID, 'assessments', 'create') ) { ?>
#12
+
/var/www/html/framework/web/CBaseController.php(126): require("/var/www/html/application/views/admin/assessments/assessments_vi...")
#13
+
/var/www/html/framework/web/CBaseController.php(95): CBaseController->renderInternal("/var/www/html/application/views/admin/assessments/assessments_vi...", array("surveyid" => "352985", "action" => "asessementactivate", "headings" => array("Scope", "Question group", "Minimum", "Maximum"), "groups" => array(4 => "G1 [G-1]"), ...), true)
#14
+
/var/www/html/framework/web/CController.php(872): CBaseController->renderFile("/var/www/html/application/views/admin/assessments/assessments_vi...", array("surveyid" => "352985", "action" => "asessementactivate", "headings" => array("Scope", "Question group", "Minimum", "Maximum"), "groups" => array(4 => "G1 [G-1]"), ...), true)
#15
–
/var/www/html/application/core/Survey_Common_Action.php(266): CController->renderPartial("/admin/assessments/assessments_view", array("surveyid" => "352985", "action" => "asessementactivate", "headings" => array("Scope", "Question group", "Minimum", "Maximum"), "groups" => array(4 => "G1 [G-1]"), ...), true)
261 // Load views
262 $content = "";
263 foreach ($aViewUrls as $sViewKey => $viewUrl) {
264 if (empty($sViewKey) || !in_array($sViewKey, array('message', 'output'))) {
265 if (is_numeric($sViewKey)) {
266 $content .= Yii::app()->getController()->renderPartial($sViewPath.$viewUrl, $aData, true);
267 } elseif (is_array($viewUrl)) {
268 foreach ($viewUrl as $aSubData) {
269 $aSubData = array_merge($aData, $aSubData);
270 $content .= Yii::app()->getController()->renderPartial($sViewPath.$sViewKey, $aSubData, true);
271 }
#16
+
/var/www/html/application/core/Survey_Common_Action.php(337): Survey_Common_Action->renderCentralContents("", array("assessments/assessments_view"), array("surveyid" => "352985", "action" => "asessementactivate", "headings" => array("Scope", "Question group", "Minimum", "Maximum"), "groups" => array(4 => "G1 [G-1]"), ...))
#17
+
/var/www/html/application/controllers/admin/assessments.php(97): Survey_Common_Action->_renderWrappedTemplate("", "assessments/assessments_view", array("surveyid" => "352985", "action" => "asessementactivate", "headings" => array("Scope", "Question group", "Minimum", "Maximum"), "groups" => array(4 => "G1 [G-1]"), ...), false)
#18
+
/var/www/html/application/controllers/admin/assessments.php(175): Assessments->_renderWrappedTemplate("", "assessments/assessments_view", array("surveyid" => "352985", "action" => "asessementactivate", "headings" => array("Scope", "Question group", "Minimum", "Maximum"), "groups" => array(4 => "G1 [G-1]"), ...))
#19
+
/var/www/html/application/controllers/admin/assessments.php(71): Assessments->_showAssessments("352985", "asessementactivate")
#20
unknown(0): Assessments->index("352985")
#21
+
/var/www/html/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(Assessments, array("352985"))
#22
+
/var/www/html/application/core/Survey_Common_Action.php(83): CAction->runWithParamsInternal(Assessments, ReflectionMethod, array("r" => "admin/assessments", "action" => "asessementactivate", "surveyid" => "352985", "iSurveyId" => "352985", ...))
#23
+
/var/www/html/framework/web/CController.php(308): Survey_Common_Action->runWithParams(array("r" => "admin/assessments", "action" => "asessementactivate", "surveyid" => "352985", "iSurveyId" => "352985", ...))
#24
+
/var/www/html/framework/web/CController.php(286): CController->runAction(Assessments)
#25
+
/var/www/html/framework/web/CController.php(265): CController->runActionWithFilters(Assessments, array())
#26
+
/var/www/html/application/controllers/AdminController.php(162): CController->run("assessments")
#27
+
/var/www/html/framework/web/CWebApplication.php(282): AdminController->run("assessments")
#28
+
/var/www/html/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/assessments")
#29
+
/var/www/html/framework/base/CApplication.php(185): CWebApplication->processRequest()
#30
+
/var/www/html/index.php(195): CApplication->run()
2017-12-29 07:47:00 nginx/1.10.3 Yii Framework/1.1.18 |
---|