View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
15678Bug reportsOtherpublic2020-02-22 20:54
Reporterferidbedru Assigned Tocdorin  
PrioritynoneSeveritypartial_block 
Status closedResolutionno change required 
Product Version3.20.x 
Summary15678: Unable to create survey
Description

While trying to create a survey, SQL error occurs and can not proceed any further.

Steps To Reproduce
  1. Navigate to the survey page
  2. click on create survey
  3. provide the information and set the settings.
  4. click on create.
  5. error occurs
Additional Information

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 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 'groups as question_groups WHERE questions.gid=question_groups.gid AND questions' at line 1. The SQL statement executed was: SELECT * FROM questions as questions, groups as question_groups WHERE questions.gid=question_groups.gid AND questions.sid=497122 AND questions.language='en' AND questions.parent_qid=0 AND question_groups.language='en' ORDER BY group_order, question_order


in /var/www/survey/framework/db/CDbCommand.php(543)

Stack Trace
#0
+
/var/www/survey/framework/db/CDbCommand.php(396): CDbCommand->queryInternal("fetchAll", array(2), array())
#1

/var/www/survey/application/helpers/common_helper.php(1575): CDbCommand->queryAll()

1570 if ($questionid !== false) {
1571 $aquery .= " and questions.qid={$questionid} ";
1572 }
1573 $aquery .= " ORDER BY group_order, question_order";
1574 /* @var Question[] $questions /
1575 $questions = Yii::app()->db->createCommand($aquery)->queryAll();
1576 $questionSeq = -1; // this is incremental question sequence across all groups
1577 $groupSeq = -1;
1578 $_groupOrder = -1;
1579
1580 foreach ($questions as $arow) {

#2

/var/www/survey/application/helpers/expressions/em_manager_helper.php(3636): createFieldMap(Survey, "full", false, false, ...)

3631 if(empty($this->surveyOptions)) {
3632 / Log it as error : this need some test /
3633 Yii::log('setVariableAndTokenMappingsForExpressionManager with an empty surveyOptions.','error','application.LimeExpressionManager');
3634 }
3635 // TODO - do I need to force refresh, or trust that createFieldMap will cache langauges properly?
3636 $fieldmap=createFieldMap($survey,$style='full',$forceRefresh,false,$SESSION['LEMlang']);
3637 $this->sid= $surveyid;
3638 $this->sessid = 'survey
' . $this->sid;
3639 $this->runtimeTimings[] = array(METHOD . '.createFieldMap',(microtime(true) - $now));
3640 // LimeExpressionManager::ShowStackTrace();
3641

#3

/var/www/survey/application/helpers/expressions/em_manager_helper.php(4932): LimeExpressionManager->setVariableAndTokenMappingsForExpressionManager("497122")

4927 $LEM->em->StartProcessingGroup(
4928 isset($_SESSION['LEMsid']) ? $_SESSION['LEMsid'] : NULL,
4929 '',
4930 true
4931 );
4932 $LEM->setVariableAndTokenMappingsForExpressionManager($_SESSION['LEMsid']);
4933 }
4934
4935 }
4936
4937 /**

#4
+
/var/www/survey/application/controllers/admin/surveyadmin.php(480): LimeExpressionManager::StartProcessingPage(false, true)
#5
unknown(0): SurveyAdmin->view("497122", null, null)
#6
+
/var/www/survey/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(SurveyAdmin, array("497122", null, null))
#7 + /var/www/survey/application/core/Survey_Common_Action.php(83): CAction->runWithParamsInternal(SurveyAdmin, ReflectionMethod, array("surveyid" => "497122", "sa" => "view", "iSurveyId" => "497122", "iSurveyID" => "497122", ...))
#8 + /var/www/survey/framework/web/CController.php(308): Survey_Common_Action->runWithParams(array("surveyid" => "497122", "sa" => "view", "iSurveyId" => "497122", "iSurveyID" => "497122", ...))
#9 +/var/www/survey/framework/web/CController.php(286): CController->runAction(SurveyAdmin)
#10 +/var/www/survey/framework/web/CController.php(265): CController->runActionWithFilters(SurveyAdmin, array())
#11 +/var/www/survey/application/controllers/AdminController.php(158): CController->run("survey")
#12 +/var/www/survey/framework/web/CWebApplication.php(282): AdminController->run("survey")
#13 +/var/www/survey/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/survey/sa/view")
#14 +/var/www/survey/framework/base/CApplication.php(185): CWebApplication->processRequest()
#15 +/var/www/survey/index.php(194): CApplication->run()

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)3.20.2
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 8
Server OS (if known)Ubuntu 18.04.3
Webserver software & version (if known)apache 2.4.25
PHP VersionPHP 7.2

Users monitoring this issue

There are no users monitoring this issue.

Activities

cdorin

cdorin

2020-01-15 17:47

reporter   ~55306

Could you please try the latest releasE?

I am unable to reproduce it in 3.21.5

cdorin

cdorin

2020-02-22 20:54

reporter   ~56155

No feedback provided

Issue History

Date Modified Username Field Change
2019-12-19 12:43 feridbedru New Issue
2020-01-15 17:47 cdorin Note Added: 55306
2020-01-15 17:47 cdorin Assigned To => cdorin
2020-01-15 17:47 cdorin Status new => feedback
2020-02-22 20:54 cdorin Status feedback => closed
2020-02-22 20:54 cdorin Resolution open => no change required
2020-02-22 20:54 cdorin Note Added: 56155