View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 09828 | Bug reports | Survey taking | public | 2015-08-12 15:28 | 2019-04-27 07:57 |
| Reporter | DenisChenu | Assigned To | DenisChenu | ||
| Priority | immediate | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 2.06+ | ||||
| Fixed in Version | 2.50.x | ||||
| Summary | 09828: Ranking question : update allowed can broke Survey DB | ||||
| Description | In ranking question : Add an answer is allowed : adding answer broke survey | ||||
| Steps To Reproduce | 1: Create a survey with a ranking question with 2 answers. See : Did not save / An unexpected error has occurred and your responses cannot be saved. | ||||
| Additional Information | Each answer create a DB column, then adding answers must be disallowed. Can be allowed :
Another solution can be :
This fix the X column creation if we need only 2/3 answers. | ||||
| Tags | No tags attached. | ||||
| Attached Files | RANKING_InternalServerError.html (1,362 bytes)
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Internal Server Error</title>
<style type="text/css">
/*<![CDATA[*/
body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;}
h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
h3 {font-family:"Verdana";font-weight:bold;font-size:11pt}
p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px}
.version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;}
/*]]>*/
</style>
</head>
<body>
<h1>Internal Server Error</h1>
<h2>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 'and sid=958678' at line 1</h2>
<p>
An internal error occurred while the Web server was processing your request.
Please contact the webmaster to report this problem.
</p>
<p>
Thank you.
</p>
<div class="version">
2015-08-12 15:30:21 </div>
</body>
</html> Exception.html (33,767 bytes)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Exception</title>
<style type="text/css">
/*<![CDATA[*/
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;margin:0;padding:0;}
body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:none;}
:focus{outline:0;}
ins{text-decoration:none;}
del{text-decoration:line-through;}
table{border-collapse:collapse;border-spacing:0;}
body {
font: normal 9pt "Verdana";
color: #000;
background: #fff;
}
h1 {
font: normal 18pt "Verdana";
color: #f00;
margin-bottom: .5em;
}
h2 {
font: normal 14pt "Verdana";
color: #800000;
margin-bottom: .5em;
}
h3 {
font: bold 11pt "Verdana";
}
pre {
font: normal 11pt Menlo, Consolas, "Lucida Console", Monospace;
}
pre span.error {
display: block;
background: #fce3e3;
}
pre span.ln {
color: #999;
padding-right: 0.5em;
border-right: 1px solid #ccc;
}
pre span.error-ln {
font-weight: bold;
}
.container {
margin: 1em 4em;
}
.version {
color: gray;
font-size: 8pt;
border-top: 1px solid #aaa;
padding-top: 1em;
margin-bottom: 1em;
}
.message {
color: #000;
padding: 1em;
font-size: 11pt;
background: #f3f3f3;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
margin-bottom: 1em;
line-height: 160%;
}
.source {
margin-bottom: 1em;
}
.code pre {
background-color: #ffe;
margin: 0.5em 0;
padding: 0.5em;
line-height: 125%;
border: 1px solid #eee;
}
.source .file {
margin-bottom: 1em;
font-weight: bold;
}
.traces {
margin: 2em 0;
}
.trace {
margin: 0.5em 0;
padding: 0.5em;
}
.trace.app {
border: 1px dashed #c00;
}
.trace .number {
text-align: right;
width: 2em;
padding: 0.5em;
}
.trace .content {
padding: 0.5em;
}
.trace .plus,
.trace .minus {
display:inline;
vertical-align:middle;
text-align:center;
border:1px solid #000;
color:#000;
font-size:10px;
line-height:10px;
margin:0;
padding:0 1px;
width:10px;
height:10px;
}
.trace.collapsed .minus,
.trace.expanded .plus,
.trace.collapsed pre {
display: none;
}
.trace-file {
cursor: pointer;
padding: 0.2em;
}
.trace-file:hover {
background: #f0ffff;
}
/*]]>*/
</style>
</head>
<body>
<div class="container">
<h1>Exception</h1>
<p class="message">
Error executing query in dbExecuteAssoc:CDbCommand failed to execute
the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown
column '958678X2740X533814' in 'field list'. The SQL statement executed
was: UPDATE lime_survey_958678 SET `lastpage`=1,
`958678X2740X533811`='A4', `958678X2740X533812`='A3',
`958678X2740X533813`='A2', `958678X2740X533814`='A1' WHERE ID=3 </p>
<div class="source">
<p class="file">/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/helpers/database_helper.php(44)</p>
<div class="code"><pre><span class="ln">32</span> {
<span class="ln">33</span> $dataset=Yii::app()->db->createCommand($sql)->query();
<span class="ln">34</span>
<span class="ln">35</span> }
<span class="ln">36</span> } catch(CDbException $e) {
<span class="ln">37</span> $error = $e->getMessage();
<span class="ln">38</span> $dataset=false;
<span class="ln">39</span> }
<span class="ln">40</span>
<span class="ln">41</span> if (!$dataset && (Yii::app()->getConfig('debug') >0 || !$silent))
<span class="ln">42</span> {
<span class="ln">43</span> // Exception is better than safeDie, because you can see the backtrace.
<span class="error"><span class="ln error-ln">44</span> throw new \Exception('Error executing query in dbExecuteAssoc:'.$error);
</span><span class="ln">45</span> }
<span class="ln">46</span> return $dataset;
<span class="ln">47</span> }
<span class="ln">48</span>
<span class="ln">49</span>
<span class="ln">50</span> function dbQueryOrFalse($sql)
<span class="ln">51</span> {
<span class="ln">52</span> try {
<span class="ln">53</span> $dataset=Yii::app()->db->createCommand($sql)->query();
<span class="ln">54</span> } catch(CDbException $e) {
<span class="ln">55</span> $dataset=false;
<span class="ln">56</span> }
</pre></div> </div>
<div class="traces">
<h2>Stack Trace</h2>
<table style="width:100%;">
<tbody><tr class="trace app expanded">
<td class="number">
#0 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/helpers/expressions/em_manager_helper.php(5425):
<strong>dbExecuteAssoc</strong>("UPDATE {{survey_958678}} SET `lastpage`=1, `958678X2740X533811`=...") </div>
<div class="code"><pre><span class="ln">5420</span>
<span class="ln">5421</span> if (isset($_SESSION[$this->sessid]['srid']) && $this->surveyOptions['active'])
<span class="ln">5422</span> {
<span class="ln">5423</span> $query .= $_SESSION[$this->sessid]['srid'];
<span class="ln">5424</span>
<span class="error"><span class="ln error-ln">5425</span> if (!dbExecuteAssoc($query))
</span><span class="ln">5426</span> {
<span class="ln">5427</span> // TODO: This kills the session if adminemail is defined, so the queries below won't work.
<span class="ln">5428</span> $message = submitfailed('', $query); // TODO - report SQL error?
<span class="ln">5429</span>
<span class="ln">5430</span> if (($this->debugLevel & LEM_DEBUG_VALIDATION_SUMMARY) == LEM_DEBUG_VALIDATION_SUMMARY) {
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#1 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/helpers/expressions/em_manager_helper.php(5603):
<strong>LimeExpressionManager</strong>-><strong>_UpdateValuesInDatabase</strong>(array("958678X2740X533811"
=> array("type" => "R", "value" => "A4"), "958678X2740X533812"
=> array("type" => "R", "value" => "A3"), "958678X2740X533813"
=> array("type" => "R", "value" => "A2"), "958678X2740X533814"
=> array("type" => "R", "value" => "A1")), true) </div>
<div class="code"><pre><span class="ln">5598</span> while (true)
<span class="ln">5599</span> {
<span class="ln">5600</span> $LEM->currentQset = array(); // reset active list of questions
<span class="ln">5601</span> if (++$LEM->currentGroupSeq >= $LEM->numGroups)
<span class="ln">5602</span> {
<span class="error"><span class="ln error-ln">5603</span> $message .= $LEM->_UpdateValuesInDatabase($updatedValues,true);
</span><span class="ln">5604</span> $LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now));
<span class="ln">5605</span> $LEM->lastMoveResult = array(
<span class="ln">5606</span> 'finished'=>true,
<span class="ln">5607</span> 'message'=>$message,
<span class="ln">5608</span> 'gseq'=>$LEM->currentGroupSeq,
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#2 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/helpers/SurveyRuntimeHelper.php(535): <strong>LimeExpressionManager</strong>::<strong>JumpTo</strong>(2, false) </div>
<div class="code"><pre><span class="ln">530</span> {
<span class="ln">531</span> // may be submitting from the navigation bar, in which case need to process all intervening questions
<span class="ln">532</span> // in order to update equations and ensure there are no intervening relevant mandatory or relevant invalid questions
<span class="ln">533</span> if($thissurvey['questionindex']==2) // Must : save actual page , review whole before set finished to true (see #09906), index==1 seems to don't need it : (don't force move)
<span class="ln">534</span> LimeExpressionManager::StartSurvey($surveyid, $surveyMode, $surveyOptions);
<span class="error"><span class="ln error-ln">535</span> $moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['totalsteps'] + 1, false);
</span><span class="ln">536</span> }
<span class="ln">537</span> }
<span class="ln">538</span> if (isset($move) && $move=='changelang')
<span class="ln">539</span> {
<span class="ln">540</span> // jump to current step using new language, processing POST values
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#3 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/controllers/survey/index.php(602): <strong>SurveyRuntimeHelper</strong>-><strong>run</strong>("958678",
array("surveyid" => "958678", "thissurvey" => array("template"
=> "default", "language" => "en", "sid" => "958678", "owner_id"
=> "1", ...), "thisstep" => "1", "tokensexist" => 0, ...)) </div>
<div class="code"><pre><span class="ln">597</span> //Send local variables to the appropriate survey type
<span class="ln">598</span> unset($redata);
<span class="ln">599</span> $redata = compact(array_keys(get_defined_vars()));
<span class="ln">600</span> Yii::import('application.helpers.SurveyRuntimeHelper');
<span class="ln">601</span> $tmp = new SurveyRuntimeHelper();
<span class="error"><span class="ln error-ln">602</span> $tmp->run($surveyid,$redata);
</span><span class="ln">603</span>
<span class="ln">604</span> if (App()->request->getPost('saveall') || isset($flashmessage))
<span class="ln">605</span> {
<span class="ln">606</span> App()->clientScript->registerScript("saveflashmessage","alert('".gT("Your responses were successfully saved.","js")."');",CClientScript::POS_READY);
<span class="ln">607</span> }
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#4 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/controllers/survey/index.php(70): <strong>index</strong>-><strong>action</strong>() </div>
<div class="code"><pre><span class="ln">65</span> App()->getClientScript()->reset();
<span class="ln">66</span> return $buffer;
<span class="ln">67</span> });
<span class="ln">68</span>
<span class="ln">69</span> ob_implicit_flush(false);
<span class="error"><span class="ln error-ln">70</span> $this->action();
</span><span class="ln">71</span> ob_flush();
<span class="ln">72</span> }
<span class="ln">73</span>
<span class="ln">74</span> function action()
<span class="ln">75</span> {
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#5 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/framework/web/actions/CAction.php(76): <strong>index</strong>-><strong>run</strong>() </div>
<div class="code"><pre><span class="ln">71</span> {
<span class="ln">72</span> $method=new ReflectionMethod($this, 'run');
<span class="ln">73</span> if($method->getNumberOfParameters()>0)
<span class="ln">74</span> return $this->runWithParamsInternal($this, $method, $params);
<span class="ln">75</span>
<span class="error"><span class="ln error-ln">76</span> $this->run();
</span><span class="ln">77</span> return true;
<span class="ln">78</span> }
<span class="ln">79</span>
<span class="ln">80</span> /**
<span class="ln">81</span> * Executes a method of an object with the supplied named parameters.
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#6 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/framework/web/CController.php(308): <strong>CAction</strong>-><strong>runWithParams</strong>(array("sid" => "958678")) </div>
<div class="code"><pre><span class="ln">303</span> {
<span class="ln">304</span> $priorAction=$this->_action;
<span class="ln">305</span> $this->_action=$action;
<span class="ln">306</span> if($this->beforeAction($action))
<span class="ln">307</span> {
<span class="error"><span class="ln error-ln">308</span> if($action->runWithParams($this->getActionParams())===false)
</span><span class="ln">309</span> $this->invalidActionParams($action);
<span class="ln">310</span> else
<span class="ln">311</span> $this->afterAction($action);
<span class="ln">312</span> }
<span class="ln">313</span> $this->_action=$priorAction;
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#7 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/framework/web/CController.php(286): <strong>CController</strong>-><strong>runAction</strong>(index) </div>
<div class="code"><pre><span class="ln">281</span> * @see runAction
<span class="ln">282</span> */
<span class="ln">283</span> public function runActionWithFilters($action,$filters)
<span class="ln">284</span> {
<span class="ln">285</span> if(empty($filters))
<span class="error"><span class="ln error-ln">286</span> $this->runAction($action);
</span><span class="ln">287</span> else
<span class="ln">288</span> {
<span class="ln">289</span> $priorAction=$this->_action;
<span class="ln">290</span> $this->_action=$action;
<span class="ln">291</span> CFilterChain::create($this,$action,$filters)->run();
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#8 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/framework/web/CController.php(265): <strong>CController</strong>-><strong>runActionWithFilters</strong>(index, array()) </div>
<div class="code"><pre><span class="ln">260</span> {
<span class="ln">261</span> if(($parent=$this->getModule())===null)
<span class="ln">262</span> $parent=Yii::app();
<span class="ln">263</span> if($parent->beforeControllerAction($this,$action))
<span class="ln">264</span> {
<span class="error"><span class="ln error-ln">265</span> $this->runActionWithFilters($action,$this->filters());
</span><span class="ln">266</span> $parent->afterControllerAction($this,$action);
<span class="ln">267</span> }
<span class="ln">268</span> }
<span class="ln">269</span> else
<span class="ln">270</span> $this->missingAction($actionID);
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#9 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/framework/web/CWebApplication.php(282): <strong>CController</strong>-><strong>run</strong>("index") </div>
<div class="code"><pre><span class="ln">277</span> {
<span class="ln">278</span> list($controller,$actionID)=$ca;
<span class="ln">279</span> $oldController=$this->_controller;
<span class="ln">280</span> $this->_controller=$controller;
<span class="ln">281</span> $controller->init();
<span class="error"><span class="ln error-ln">282</span> $controller->run($actionID);
</span><span class="ln">283</span> $this->_controller=$oldController;
<span class="ln">284</span> }
<span class="ln">285</span> else
<span class="ln">286</span> throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
<span class="ln">287</span> array('{route}'=>$route===''?$this->defaultController:$route)));
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#10 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/framework/web/CWebApplication.php(141): <strong>CWebApplication</strong>-><strong>runController</strong>("survey/index/sid/958678") </div>
<div class="code"><pre><span class="ln">136</span> foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
<span class="ln">137</span> $_GET[$name]=$value;
<span class="ln">138</span> }
<span class="ln">139</span> else
<span class="ln">140</span> $route=$this->getUrlManager()->parseUrl($this->getRequest());
<span class="error"><span class="ln error-ln">141</span> $this->runController($route);
</span><span class="ln">142</span> }
<span class="ln">143</span>
<span class="ln">144</span> /**
<span class="ln">145</span> * Registers the core application components.
<span class="ln">146</span> * This method overrides the parent implementation by registering additional core components.
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#11 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/framework/base/CApplication.php(185): <strong>CWebApplication</strong>-><strong>processRequest</strong>() </div>
<div class="code"><pre><span class="ln">180</span> public function run()
<span class="ln">181</span> {
<span class="ln">182</span> if($this->hasEventHandler('onBeginRequest'))
<span class="ln">183</span> $this->onBeginRequest(new CEvent($this));
<span class="ln">184</span> register_shutdown_function(array($this,'end'),0,false);
<span class="error"><span class="ln error-ln">185</span> $this->processRequest();
</span><span class="ln">186</span> if($this->hasEventHandler('onEndRequest'))
<span class="ln">187</span> $this->onEndRequest(new CEvent($this));
<span class="ln">188</span> }
<span class="ln">189</span>
<span class="ln">190</span> /**
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#12 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/index.php(212): <strong>CApplication</strong>-><strong>run</strong>() </div>
<div class="code"><pre><span class="ln">207</span> die (sprintf('%s should be writable by the webserver (766 or 776).', $runtimePath));
<span class="ln">208</span> }
<span class="ln">209</span> }
<span class="ln">210</span>
<span class="ln">211</span> Yii::$enableIncludePath = false;
<span class="error"><span class="ln error-ln">212</span> Yii::createApplication('LSYii_Application', $config)->run();
</span><span class="ln">213</span>
<span class="ln">214</span> /* End of file index.php */
<span class="ln">215</span> /* Location: ./index.php */
</pre></div> </td>
</tr>
</tbody></table>
</div>
<div class="version">
2016-06-02 16:16:04 Apache/2.2.22 (Debian) <a href="http://www.yiiframework.com/">Yii Framework</a>/1.1.17 </div>
</div>
<script type="text/javascript">
/*<![CDATA[*/
var traceReg = new RegExp("(^|\\s)trace-file(\\s|$)");
var collapsedReg = new RegExp("(^|\\s)collapsed(\\s|$)");
var e = document.getElementsByTagName("div");
for(var j=0,len=e.length;j<len;j++){
if(traceReg.test(e[j].className)){
e[j].onclick = function(){
var trace = this.parentNode.parentNode;
if(collapsedReg.test(trace.className))
trace.className = trace.className.replace("collapsed", "expanded");
else
trace.className = trace.className.replace("expanded", "collapsed");
}
}
}
/*]]>*/
</script>
<table class="yiiLog" style="border-spacing:1px;font:11px Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;color:#666666;" cellpadding="2" width="100%">
<tbody><tr>
<th style="background:black;color:white;" colspan="6">
Profiling Summary Report
(Time: 0.36139s,
Memory: 10,380KB)
</th>
</tr>
<tr style="background-color: #ccc;">
<th>Procedure</th>
<th>Count</th>
<th>Total (s)</th>
<th>Avg. (s)</th>
<th>Min. (s)</th>
<th>Max. (s)</th>
</tr>
<tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_surveys`)</td>
<td align="center">1</td>
<td align="center">0.00771</td>
<td align="center">0.00771</td>
<td align="center">0.00771</td>
<td align="center">0.00771</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_permissions`)</td>
<td align="center">1</td>
<td align="center">0.00653</td>
<td align="center">0.00653</td>
<td align="center">0.00653</td>
<td align="center">0.00653</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_plugin_settings`)</td>
<td align="center">1</td>
<td align="center">0.00595</td>
<td align="center">0.00595</td>
<td align="center">0.00595</td>
<td align="center">0.00595</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_templates`)</td>
<td align="center">1</td>
<td align="center">0.00526</td>
<td align="center">0.00526</td>
<td align="center">0.00526</td>
<td align="center">0.00526</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_surveys_languagesettings`)</td>
<td align="center">1</td>
<td align="center">0.00507</td>
<td align="center">0.00507</td>
<td align="center">0.00507</td>
<td align="center">0.00507</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_settings_global`)</td>
<td align="center">1</td>
<td align="center">0.00477</td>
<td align="center">0.00477</td>
<td align="center">0.00477</td>
<td align="center">0.00477</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_plugins`)</td>
<td align="center">1</td>
<td align="center">0.00474</td>
<td align="center">0.00474</td>
<td align="center">0.00474</td>
<td align="center">0.00474</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SHOW TABLES)</td>
<td align="center">1</td>
<td align="center">0.00220</td>
<td align="center">0.00220</td>
<td align="center">0.00220</td>
<td align="center">0.00220</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SELECT `t`.`surveyls_survey_id` AS
`t0_c0`, `t`.`surveyls_language` AS `t0_c1`, `t`.`surveyls_title` AS
`t0_c2`, `t`.`surveyls_description` AS `t0_c3`,
`t`.`surveyls_welcometext` AS `t0_c4`, `t`.`surveyls_endtext` AS
`t0_c5`, `t`.`surveyls_url` AS `t0_c6`, `t`.`surveyls_urldescription` AS
`t0_c7`, `t`.`surveyls_email_invite_subj` AS `t0_c8`,
`t`.`surveyls_email_invite` AS `t0_c9`, `t`.`surveyls_email_remind_subj`
AS `t0_c10`, `t`.`surveyls_email_remind` AS `t0_c11`,
`t`.`surveyls_email_register_subj` AS `t0_c12`,
`t`.`surveyls_email_register` AS `t0_c13`,
`t`.`surveyls_email_confirm_subj` AS `t0_c14`,
`t`.`surveyls_email_confirm` AS `t0_c15`, `t`.`surveyls_dateformat` AS
`t0_c16`, `t`.`surveyls_attributecaptions` AS `t0_c17`,
`t`.`email_admin_notification_subj` AS `t0_c18`,
`t`.`email_admin_notification` AS `t0_c19`,
`t`.`email_admin_responses_subj` AS `t0_c20`,
`t`.`email_admin_responses` AS `t0_c21`, `t`.`surveyls_numberformat` AS
`t0_c22`, `t`.`attachments` AS `t0_c23`, `survey`.`sid` AS `t1_c0`,
`survey`.`owner_id` AS `t1_c1`, `survey`.`admin` AS `t1_c2`,
`survey`.`active` AS `t1_c3`, `survey`.`expires` AS `t1_c4`,
`survey`.`startdate` AS `t1_c5`, `survey`.`adminemail` AS `t1_c6`,
`survey`.`anonymized` AS `t1_c7`, `survey`.`faxto` AS `t1_c8`,
`survey`.`format` AS `t1_c9`, `survey`.`savetimings` AS `t1_c10`,
`survey`.`template` AS `t1_c11`, `survey`.`language` AS `t1_c12`,
`survey`.`additional_languages` AS `t1_c13`, `survey`.`datestamp` AS
`t1_c14`, `survey`.`usecookie` AS `t1_c15`, `survey`.`allowregister` AS
`t1_c16`, `survey`.`allowsave` AS `t1_c17`, `survey`.`autonumber_start`
AS `t1_c18`, `survey`.`autoredirect` AS `t1_c19`, `survey`.`allowprev`
AS `t1_c20`, `survey`.`printanswers` AS `t1_c21`, `survey`.`ipaddr` AS
`t1_c22`, `survey`.`refurl` AS `t1_c23`, `survey`.`datecreated` AS
`t1_c24`, `survey`.`publicstatistics` AS `t1_c25`,
`survey`.`publicgraphs` AS `t1_c26`, `survey`.`listpublic` AS `t1_c27`,
`survey`.`htmlemail` AS `t1_c28`, `survey`.`sendconfirmation` AS
`t1_c29`, `survey`.`tokenanswerspersistence` AS `t1_c30`,
`survey`.`assessments` AS `t1_c31`, `survey`.`usecaptcha` AS `t1_c32`,
`survey`.`usetokens` AS `t1_c33`, `survey`.`bounce_email` AS `t1_c34`,
`survey`.`attributedescriptions` AS `t1_c35`, `survey`.`emailresponseto`
AS `t1_c36`, `survey`.`emailnotificationto` AS `t1_c37`,
`survey`.`tokenlength` AS `t1_c38`, `survey`.`showxquestions` AS
`t1_c39`, `survey`.`showgroupinfo` AS `t1_c40`, `survey`.`shownoanswer`
AS `t1_c41`, `survey`.`showqnumcode` AS `t1_c42`, `survey`.`bouncetime`
AS `t1_c43`, `survey`.`bounceprocessing` AS `t1_c44`,
`survey`.`bounceaccounttype` AS `t1_c45`, `survey`.`bounceaccounthost`
AS `t1_c46`, `survey`.`bounceaccountpass` AS `t1_c47`,
`survey`.`bounceaccountencryption` AS `t1_c48`,
`survey`.`bounceaccountuser` AS `t1_c49`, `survey`.`showwelcome` AS
`t1_c50`, `survey`.`showprogress` AS `t1_c51`,
`survey`.`navigationdelay` AS `t1_c52`, `survey`.`nokeyboard` AS
`t1_c53`, `survey`.`alloweditaftercompletion` AS `t1_c54`,
`survey`.`googleanalyticsstyle` AS `t1_c55`,
`survey`.`googleanalyticsapikey` AS `t1_c56`, `survey`.`questionindex`
AS `t1_c57` FROM `lime_surveys_languagesettings` `t` LEFT OUTER JOIN
`lime_surveys` `survey` ON (t.surveyls_survey_id = survey.sid) WHERE
(`t`.`surveyls_survey_id`=958678 AND `t`.`surveyls_language`='en'))</td>
<td align="center">1</td>
<td align="center">0.00143</td>
<td align="center">0.00143</td>
<td align="center">0.00143</td>
<td align="center">0.00143</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SELECT * FROM `lime_settings_global` `t`)</td>
<td align="center">1</td>
<td align="center">0.00115</td>
<td align="center">0.00115</td>
<td align="center">0.00115</td>
<td align="center">0.00115</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SELECT * FROM `lime_plugin_settings`
`t` WHERE `t`.`plugin_id`=:yp0 AND `t`.`model` IS NULL AND
`t`.`model_id` IS NULL AND `t`.`key`=:yp1. Bound with :yp0='82',
:yp1='useSessionLifeTime')</td>
<td align="center">1</td>
<td align="center">0.00112</td>
<td align="center">0.00112</td>
<td align="center">0.00112</td>
<td align="center">0.00112</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SELECT * FROM `lime_plugin_settings`
`t` WHERE `t`.`plugin_id`=:yp0 AND `t`.`model` IS NULL AND
`t`.`model_id` IS NULL AND `t`.`key`=:yp1. Bound with :yp0='82',
:yp1='interval')</td>
<td align="center">1</td>
<td align="center">0.00105</td>
<td align="center">0.00105</td>
<td align="center">0.00105</td>
<td align="center">0.00105</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SELECT * FROM `lime_surveys` `t` WHERE `t`.`sid`=958678 LIMIT 1)</td>
<td align="center">1</td>
<td align="center">0.00071</td>
<td align="center">0.00071</td>
<td align="center">0.00071</td>
<td align="center">0.00071</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SHOW CREATE TABLE `lime_surveys`)</td>
<td align="center">1</td>
<td align="center">0.00061</td>
<td align="center">0.00061</td>
<td align="center">0.00061</td>
<td align="center">0.00061</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SELECT * FROM `lime_permissions` `t`
WHERE `t`.`entity_id`=:yp0 AND `t`.`entity`=:yp1 AND `t`.`uid`=:yp2 AND
`t`.`permission`=:yp3 LIMIT 1. Bound with :yp0=0, :yp1='global', :yp2=1,
:yp3='superadmin')</td>
<td align="center">1</td>
<td align="center">0.00059</td>
<td align="center">0.00059</td>
<td align="center">0.00059</td>
<td align="center">0.00059</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(UPDATE lime_survey_958678 SET
`lastpage`=1, `958678X2740X533811`='A4', `958678X2740X533812`='A3',
`958678X2740X533813`='A2', `958678X2740X533814`='A1' WHERE ID=3)</td>
<td align="center">1</td>
<td align="center">0.00050</td>
<td align="center">0.00050</td>
<td align="center">0.00050</td>
<td align="center">0.00050</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SELECT * FROM `lime_settings_global` `t` WHERE stg_name=:name LIMIT 1. Bound with :name='DBVersion')</td>
<td align="center">1</td>
<td align="center">0.00041</td>
<td align="center">0.00041</td>
<td align="center">0.00041</td>
<td align="center">0.00041</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SELECT * FROM `lime_plugins` `t` WHERE `t`.`active`=:yp0. Bound with :yp0=1)</td>
<td align="center">1</td>
<td align="center">0.00035</td>
<td align="center">0.00035</td>
<td align="center">0.00035</td>
<td align="center">0.00035</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SHOW CREATE TABLE `lime_permissions`)</td>
<td align="center">1</td>
<td align="center">0.00031</td>
<td align="center">0.00031</td>
<td align="center">0.00031</td>
<td align="center">0.00031</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SHOW CREATE TABLE `lime_settings_global`)</td>
<td align="center">1</td>
<td align="center">0.00030</td>
<td align="center">0.00030</td>
<td align="center">0.00030</td>
<td align="center">0.00030</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SHOW CREATE TABLE `lime_surveys_languagesettings`)</td>
<td align="center">1</td>
<td align="center">0.00025</td>
<td align="center">0.00025</td>
<td align="center">0.00025</td>
<td align="center">0.00025</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SHOW CREATE TABLE `lime_plugin_settings`)</td>
<td align="center">1</td>
<td align="center">0.00023</td>
<td align="center">0.00023</td>
<td align="center">0.00023</td>
<td align="center">0.00023</td>
</tr> <tr style="background:#FFFFFF">
<td>system.db.CDbCommand.query(SHOW CREATE TABLE `lime_templates`)</td>
<td align="center">1</td>
<td align="center">0.00021</td>
<td align="center">0.00021</td>
<td align="center">0.00021</td>
<td align="center">0.00021</td>
</tr> <tr style="background:#F5F5F5">
<td>system.db.CDbCommand.query(SHOW CREATE TABLE `lime_plugins`)</td>
<td align="center">1</td>
<td align="center">0.00020</td>
<td align="center">0.00020</td>
<td align="center">0.00020</td>
<td align="center">0.00020</td>
</tr></tbody></table>
<!-- end of profiling summary --></body></html>
<!-- start profiling summary --> | ||||
| Bug heat | 10 | ||||
| Complete LimeSurvey version number (& build) | 150812 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | not relevant | ||||
| Database type & version | not relevant | ||||
| Server OS (if known) | not relevant | ||||
| Webserver software & version (if known) | not relevant | ||||
| PHP Version | not relevant | ||||
| related to | 11396 | closed | DenisChenu | Expression manager foir max_answers ranking are not comptletly used |
| related to | 14819 | closed | DenisChenu | Incorrect behavior with Question of type R (Classement) |
|
Adding LSA : not sure import system work here. |
|
|
An error occurred saving a response to survey id Broken ranking - 958678 DATA TO BE ENTERED: SQL CODE THAT FAILED: ERROR MESSAGE: |
|
|
When I introduced the subquestion I did not realize that these would not have been answer options but subquestions, instead. |
|
|
I like the
Because sometimes you show 100 answers and need only 5 (for example). Or an new attribute for this question ? PS: here : update answers must be allowed. It's add more answer than at started survey. |
|
|
Could you paste the entire SQL query that's faulty, please? |
|
|
Uploaded Exception.html . But the issue here is : adding an answer add a "column" for ranking question, even after activate. Like alredy said:
|
|
|
Is this 2.06 or 2.5 or both? |
|
|
Both : Exception.html was done with 2.50. But 2.06 have the same issue. The issue is really : set column number according to ANSWER. We allow updating answer and not SubQUestion. Like already said :
I really think have a new core question settings for "number of columns" to create is the best way for user (surely not for dev ;) ) |
|
|
For consistency, I think I'll make it impossible to delete/create answer options while the survey is active (as with regular questions). |
|
|
@olle : All answer can be updated, SubQuestion can not be updated. See "single choice" question type for example. |
|
|
I see some problems with using "Maximum answers" attribute.
Comments? |
|
|
2: if user add 9999 answer before activate : Try to create 999 columns : it's amlready the case, and can break some survey where you want ony the 3 first in a 200 list (you must use alternate solution : http://demonstration.sondages.pro/714997) 1: It's the reason why i propose nto ADD a new attribute, when activate : set it by defaulot to actual answers number. User can add any answers : whe only allow 2 to be ranked. The "maxDBanswers" are deactivated when survey is activated. When survey runtime : $maxDBanswers = min($maxDBanswers,count($answers)) : all other are set to null value. |
|
|
I agree with adding an attribute instead of hijacking an already existent one. Will ask Carsten tomorrow. |
|
|
Possible to get it to work with already activated surveys? Should not get worse, at least (attribute __max_db_answers might not exist). |
|
|
We can add answer only when editing question, but you're right : there are potential issue with old surveys . |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=19446 |
|
|
Version 2.50+ Build 160616 released |
|
|
See https://github.com/LimeSurvey/LimeSurvey/pull/507 Foixed by : allow ADMIN to set max columns on DB. |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=19490 |
|
|
I do a fix for my 2.06 : you want it for lts ? |
|
|
Version 2.50 Build 160620 released |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=23719 |
|
|
Fix committed to develop branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=23789 |
|
|
Fix committed to develop branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=23826 |
|
|
LimeSurvey: master 2306449d 2016-06-14 15:22 Details Diff |
Fixed issue 09828: Ranking question : update allowed can broke Survey DB |
Affected Issues 09828 |
|
| mod - application/controllers/admin/database.php | Diff File | ||
| mod - application/helpers/admin/activate_helper.php | Diff File | ||
|
LimeSurvey: master 5653348c 2016-06-15 16:23 Details Diff |
Fixed issue 09828: Ranking question : update allowed can broke Survey DB Dev: add a new QuestionAttribute maxDBanswers, not updatable if survey is activated Dev: fix max_answers according to this attribute Dev: Have only maxDBanswers in survey runtime, then other are not set Dev: Sub question by answer number OR attribute in createFieldMap Dev: todo : some fix specific to EM Dev: set maxDBanswers when update and when import LSA |
Affected Issues 09828 |
|
| mod - application/controllers/admin/database.php | Diff File | ||
| mod - application/helpers/admin/activate_helper.php | Diff File | ||
| mod - application/helpers/common_helper.php | Diff File | ||
| mod - application/helpers/expressions/em_manager_helper.php | Diff File | ||
| mod - application/helpers/qanda_helper.php | Diff File | ||
|
LimeSurvey: master 9cbb9ba0 2017-08-23 15:49 Details Diff |
Dev: Re-fix issue 09828 : adding subquestion multiple times update max_subquestions Dev: Adding attribute only if not exist Dev: related https://github.com/LimeSurvey/LimeSurvey/commit/d09e6d4423cdfd1d216231dd9ac1396fcd621f68#diff-4c8b6e0396ccd2f7fad4f57489b63b06L156 and https://github.com/LimeSurvey/LimeSurvey/pull/507 |
Affected Issues 09828 |
|
| mod - application/controllers/admin/database.php | Diff File | ||
|
LimeSurvey: develop 40df2b90 2017-08-23 15:49
Committer: Details Diff |
Dev: Re-fix issue 09828 : adding subquestion multiple times update max_subquestions Dev: Adding attribute only if not exist Dev: related https://github.com/LimeSurvey/LimeSurvey/commit/d09e6d4423cdfd1d216231dd9ac1396fcd621f68#diff-4c8b6e0396ccd2f7fad4f57489b63b06L156 and https://github.com/LimeSurvey/LimeSurvey/pull/507 |
Affected Issues 09828 |
|
| mod - application/controllers/admin/database.php | Diff File | ||
|
LimeSurvey: develop a60d96bc 2017-08-23 15:49
Committer: Details Diff |
Revert "Dev: Re-fix issue 09828 : adding subquestion multiple times update max_subquestions" This reverts commit 40df2b90619fa3fda5d4fa2effb786097737ee67. |
Affected Issues 09828 |
|
| mod - application/controllers/admin/database.php | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-08-12 15:28 | DenisChenu | New Issue | |
| 2015-08-12 15:31 | DenisChenu | File Added: survey_archive_rankingBroken.lsa | |
| 2015-08-12 15:31 | DenisChenu | File Added: RANKING_InternalServerError.html | |
| 2015-08-12 15:31 | DenisChenu | Note Added: 32936 | |
| 2015-08-12 15:35 | DenisChenu | Note Added: 32937 | |
| 2015-08-14 10:49 | c_schmitz | Assigned To | => c_schmitz |
| 2015-08-14 10:49 | c_schmitz | Status | new => assigned |
| 2015-12-08 16:55 | c_schmitz | Note Added: 33757 | |
| 2015-12-08 17:06 | DenisChenu | Note Added: 33760 | |
| 2015-12-08 17:07 | DenisChenu | Note Edited: 33760 | |
| 2016-02-29 15:34 | c_schmitz | Status | assigned => acknowledged |
| 2016-03-15 11:17 |
|
Product Version | => 2.06+ |
| 2016-05-27 09:39 | c_schmitz | Assigned To | c_schmitz => |
| 2016-05-27 09:39 | c_schmitz | Status | acknowledged => new |
| 2016-05-27 09:39 | c_schmitz | Priority | normal => immediate |
| 2016-06-02 15:23 | ollehar | Note Added: 39086 | |
| 2016-06-02 16:16 | DenisChenu | File Added: Exception.html | |
| 2016-06-02 16:20 | DenisChenu | Note Added: 39090 | |
| 2016-06-09 16:17 | ollehar | Assigned To | => ollehar |
| 2016-06-09 16:17 | ollehar | Status | new => assigned |
| 2016-06-09 16:18 | ollehar | Note Added: 39372 | |
| 2016-06-09 16:29 | DenisChenu | Note Added: 39373 | |
| 2016-06-09 16:32 | ollehar | Note Added: 39374 | |
| 2016-06-09 16:35 | DenisChenu | Note Added: 39375 | |
| 2016-06-09 17:11 | ollehar | Note Added: 39379 | |
| 2016-06-09 17:29 | DenisChenu | Note Added: 39380 | |
| 2016-06-09 18:00 | ollehar | Note Added: 39385 | |
| 2016-06-14 09:57 | ollehar | Assigned To | ollehar => |
| 2016-06-14 09:57 | ollehar | Assigned To | => ollehar |
| 2016-06-14 09:57 | ollehar | Status | assigned => new |
| 2016-06-14 09:57 | ollehar | Assigned To | ollehar => |
| 2016-06-14 13:11 | ollehar | Assigned To | => ollehar |
| 2016-06-14 13:11 | ollehar | Status | new => assigned |
| 2016-06-14 13:11 | ollehar | Sticky Issue | No => Yes |
| 2016-06-14 14:01 | ollehar | Note Added: 39541 | |
| 2016-06-14 14:04 | DenisChenu | Note Added: 39542 | |
| 2016-06-14 16:13 | ollehar | Changeset attached | => LimeSurvey master 2306449d |
| 2016-06-14 16:13 | ollehar | Note Added: 39550 | |
| 2016-06-14 16:13 | ollehar | Resolution | open => fixed |
| 2016-06-14 16:20 | ollehar | Status | assigned => resolved |
| 2016-06-14 16:20 | ollehar | Fixed in Version | => 2.5 |
| 2016-06-15 11:01 |
|
Sticky Issue | Yes => No |
| 2016-06-17 08:45 | c_schmitz | Note Added: 39646 | |
| 2016-06-17 08:45 | c_schmitz | Status | resolved => closed |
| 2016-06-17 09:24 | DenisChenu | Relationship added | related to 11396 |
| 2016-06-17 09:25 | DenisChenu | Note Added: 39660 | |
| 2016-06-17 09:25 | DenisChenu | Status | closed => feedback |
| 2016-06-17 09:25 | DenisChenu | Resolution | fixed => reopened |
| 2016-06-17 16:46 | DenisChenu | Assigned To | ollehar => DenisChenu |
| 2016-06-17 16:46 | DenisChenu | Status | feedback => assigned |
| 2016-06-17 16:47 | DenisChenu | Changeset attached | => LimeSurvey master 5653348c |
| 2016-06-17 16:47 | DenisChenu | Note Added: 39678 | |
| 2016-06-17 16:58 | DenisChenu | Status | assigned => resolved |
| 2016-06-17 16:58 | DenisChenu | Resolution | reopened => fixed |
| 2016-06-17 16:58 | DenisChenu | Note Added: 39680 | |
| 2016-06-20 15:31 | c_schmitz | Note Added: 39731 | |
| 2016-06-20 15:31 | c_schmitz | Status | resolved => closed |
| 2017-08-23 13:49 | DenisChenu | Changeset attached | => LimeSurvey master 9cbb9ba0 |
| 2017-08-23 13:49 | DenisChenu | Note Added: 44337 | |
| 2017-08-28 12:05 |
|
Changeset attached | => LimeSurvey develop 40df2b90 |
| 2017-08-28 12:05 |
|
Note Added: 44366 | |
| 2017-09-01 16:02 |
|
Changeset attached | => LimeSurvey develop a60d96bc |
| 2017-09-01 16:02 |
|
Note Added: 44395 | |
| 2019-04-27 07:57 | DenisChenu | Relationship added | related to 14819 |