View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
14649Bug reportsSurvey editingpublic2019-04-30 09:11
Reporterlemeurt Assigned ToDenisChenu  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version3.15.x 
Fixed in Version3.17.x 
Summary14649: CDbException when a "default answer" option is not compatible with a question type
Description

Changing the question type on a question with an incompatible "default answer" option may lead to a CDbException when taking the survey.

Proposed patch: When updating a question type, either reset the default answers or selectively reset the default answers if the new question type is not compliant with the previous one.

Steps To Reproduce
  • Create a question of type text
  • Add a long default answer as text
  • Change the question type to List Dropdown
  • add answers (the code is 5 Chars max)
  • activate the survey (the answer table prepares a varying(5) field type
  • Try to answer the survey ==> Error 500 Internal Server Error
    CDbCommand n'a pas pu exécuter la commande SQL: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(5)
Additional Information

Detailed error with Debugging:

CDbCommand n'a pas pu exécuter la commande SQL: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(5)

CDbException

CDbCommand n'a pas pu exécuter la commande SQL: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(5). The SQL statement executed was: UPDATE lime_survey_114132 SET "lastpage"=0, "114132X202X1951"='1A CentraleSupélec 2A cursus centralien 2A cursus Supélec', "114132X202X1956"='Oui Non Ne sait pas encore' WHERE ID=601 (/var/www/html/limesurvey/framework/db/CDbCommand.php:543)

#0 /var/www/html/limesurvey/framework/db/CDbCommand.php(377): CDbCommand->queryInternal('', 0, Array)
#1 /var/www/html/limesurvey/application/helpers/expressions/em_manager_helper.php(5565): CDbCommand->query()
#2 /var/www/html/limesurvey/application/helpers/expressions/em_manager_helper.php(5290): LimeExpressionManager->_UpdateValuesInDatabase()
#3 /var/www/html/limesurvey/application/helpers/SurveyRuntimeHelper.php(838): LimeExpressionManager::NavigateForwards()
#4 /var/www/html/limesurvey/application/helpers/SurveyRuntimeHelper.php(537): SurveyRuntimeHelper->setMoveResult()
#5 /var/www/html/limesurvey/application/helpers/SurveyRuntimeHelper.php(104): SurveyRuntimeHelper->initMove()
#6 /var/www/html/limesurvey/application/controllers/survey/index.php(591): SurveyRuntimeHelper->run('114132', Array)
#7 /var/www/html/limesurvey/application/controllers/survey/index.php(24): index->action()
#8 /var/www/html/limesurvey/framework/web/actions/CAction.php(76): index->run()
#9 /var/www/html/limesurvey/framework/web/CController.php(308): CAction->runWithParams(Array)
#10 /var/www/html/limesurvey/framework/web/CController.php(286): CController->runAction(Object(index))
#11 /var/www/html/limesurvey/framework/web/CController.php(265): CController->runActionWithFilters(Object(index), Array)
#12 /var/www/html/limesurvey/framework/web/CWebApplication.php(282): CController->run('index')
#13 /var/www/html/limesurvey/framework/web/CWebApplication.php(141): CWebApplication->runController('survey/index/si...')
#14 /var/www/html/limesurvey/framework/base/CApplication.php(185): CWebApplication->processRequest()
#15 /var/www/html/limesurvey/index.php(194): CApplication->run()
#16 {main}

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)Version 3.15.8+190130
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgres and mariaDB 10.3.12
Server OS (if known)
Webserver software & version (if known)
PHP VersionN/A

Relationships

related to 10827 closedDenisChenu Whole answers must be filtered before try to save in DB 
related to 14768 closeddominikvitt Survey fails when default answer is set 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2019-03-14 12:20

developer   ~50981

2 patch must be done

  1. must fix the CDB value even with invalid value
  2. Auto fif default value in GUI

PS : a cool way to have a default value for single choice. When 1 is fixed : we can add a input:text for singlme choice too (like with Yes/No question type).

DenisChenu

DenisChenu

2019-03-14 12:24

developer   ~50982

Related to https://bugs.limesurvey.org/view.php?id=10827 because it does the same things for user entered value (filter $_POST before set).
For default value : error can be shown, but maybe only for user with edit content rights on survey ?

lemeurt

lemeurt

2019-03-15 11:34

reporter   ~51002

Hi Denis,
10827 is private, I can't access it.

DenisChenu

DenisChenu

2019-03-15 11:58

developer   ~51003

I set 10827 public since it was private due to security.
You can find the fix here : https://github.com/LimeSurvey/LimeSurvey/commit/6c7c30d13a9cb45aee498cf4d3eb0a5c8b06ed19

The big part is https://github.com/LimeSurvey/LimeSurvey/commit/6c7c30d13a9cb45aee498cf4d3eb0a5c8b06ed19#diff-796aba4d06254b9caea9d461e4ea80c9R10238
Maybe adding an optionnal settings private static function checkValidityAnswer($type,$value,$sgq,$qinfo,$setInvalidAnswerString = true)
And use it to filter default value ?

lemeurt

lemeurt

2019-03-15 22:31

reporter   ~51021

Just to let write down that this is only a major bug for Postgres users as in Mysql when trying to insert too much data in a short database column, the data is automatically truncated without throwing Exceptions.

DenisChenu

DenisChenu

2019-03-29 19:38

developer   ~51212

Same issue with mariadDB, send a lss, but unsure it work when import.

500: Internal Server Error.html (8,873 bytes)   
<!DOCTYPE html>
<html dir="ltr" class="en dir-ltr  no-js " lang="en"><!-- default --><head>


    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="generator" content="LimeSurvey http://www.limesurvey.org">
        
    <link rel="stylesheet" type="text/css" href="500:%20Internal%20Server%20Error_fichiers/font-awesome.css">
<link rel="stylesheet" type="text/css" href="500:%20Internal%20Server%20Error_fichiers/survey.css">
<link rel="stylesheet" type="text/css" href="500:%20Internal%20Server%20Error_fichiers/yiistrap.css">
<link rel="stylesheet" type="text/css" href="500:%20Internal%20Server%20Error_fichiers/noto.css">
<link rel="stylesheet" type="text/css" href="500:%20Internal%20Server%20Error_fichiers/custom.css">
<link rel="stylesheet" type="text/css" href="500:%20Internal%20Server%20Error_fichiers/lsbootstrap.css">
<link rel="stylesheet" type="text/css" href="500:%20Internal%20Server%20Error_fichiers/skelvanilla.css">
<link rel="stylesheet" type="text/css" href="500:%20Internal%20Server%20Error_fichiers/theme.css">
<link rel="stylesheet" type="text/css" href="500:%20Internal%20Server%20Error_fichiers/hideemptycolumn.css">
<script type="text/javascript">window.debugState = {frontend : (0 === 1), backend : (0 === 1)};</script><script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/jquery-3.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/jquery-migrate-3.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/moment-with-locales.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/survey.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/template-core.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/bootstrap.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/bootstrapconfirm.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/lslog.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/pjax.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/custom.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/aria-live.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/theme-vanilla.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/skelvanilla.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/theme.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/survey_runtime.js" class="headScriptTag"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/em_javascript.js" class="headScriptTag"></script>
<script type="text/javascript">
/*<![CDATA[*/
LSvar={"bFixNumAuto":1,"bNumRealValue":0,"sLEMradix":".","lang":{"confirm":{"confirm_cancel":"Cancel","confirm_ok":"OK"}},"showpopup":0,"startPopups":{},"debugMode":0};
LSvar= LSvar || {};
LSvar.bFixNumAuto = 0;
LSvar.bNumRealValue = 1;
/*]]>*/
</script>
<title>
                500: Internal Server Error
    </title>
    <script type="text/javascript">
        if(window.basicThemeScripts === undefined){ 
            window.basicThemeScripts = new ThemeScripts(); 
        } 
    </script>
        
            
        
        <link rel="icon" type="image/png" sizes="32x32" href="http://limesurvey.local/master/tmp/assets/7e290b9a/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="http://limesurvey.local/master/tmp/assets/7e290b9a/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="http://limesurvey.local/master/tmp/assets/7e290b9a/favicon-16x16.png">

    
</head>

    
    <body class="skelvanilla vanilla lsbootstrap lang-en body-loaded"><script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/decimal.js"></script>
<script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/decimalcustom.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
setJsVar();
var LEMmode='group';
var LEMgseq='';
ExprMgr_process_relevance_and_tailoring = function(evt_type,sgqa,type){
if (typeof LEM_initialized == 'undefined') {
LEM_initialized=true;
LEMsetTabIndexes();
}
if (evt_type == 'onchange' && (typeof last_sgqa !== 'undefined' && sgqa==last_sgqa) && (typeof last_evt_type !== 'undefined' && last_evt_type == 'TAB' && type != 'checkbox')) {
  last_evt_type='onchange';
  last_sgqa=sgqa;
  return;
}
last_evt_type = evt_type;
last_sgqa=sgqa;
  relChange6155=false;
  relChangeG0=false;

}

/*]]>*/
</script>

        <div id="dynamicReloadContainer">
                                                                
<!-- Bootstrap Navigation Bar -->
<header class=" navbar navbar-default navbar-static-top hidden-print">
    <div class="container-fluid">
        <div class=" navbar-header ">
            
            
            <h1 class=" navbar-brand  ">
                                500: Internal Server Error
            </h1>
        </div>
        
    </div>
</header>

                
                <!-- Outer Frame Container -->
                <main class=" outerframe   container  " id="outerframeContainer">
    <div class="well">
                    <h1 class="text-danger">500: Internal Server Error</h1>
                <div class="h2">CDbCommand failed to execute the SQL 
statement: SQLSTATE[22001]: String data, right truncated: 1406 Data too 
long for column '711522X461X6155' at row 1
        <div>
            An internal error occurred while the Web server was processing your request.
        </div>
        
        <p class="small text-right">
                            Please contact Administrator to report this problem.
                    </p>
    </div>
</div></main>



                                                



<!-- Bootstrap Modal Alert -->
<div id="bootstrap-alert-box-modal" class=" modal fade ">
    <div class=" modal-dialog ">
        <div class=" modal-content ">
            <div class=" modal-header " style="min-height:40px;">
                <button type="button" data-dismiss="modal" aria-hidden="true" class=" close ">×</button>
                <div class=" modal-title h4 ">&nbsp;</div>
            </div>
            <div class=" modal-body ">
                <p></p>
            </div>
            <div class=" modal-footer ">
                <a href="#" data-dismiss="modal" class=" btn btn-default ">Close</a>
            </div>
        </div>
    </div>
</div>

                                                        <!-- <footer class="navbar-default"></footer> -->

                    </div>
                <div id="ajax-loading" aria-hidden="1"><i class="loader fa fa-circle-o-notch fa-spin fa-3x fa-fw text-muted"></i></div>
<script>
if (!window.jQuery) {
    window.onload = function() {
        body = document.getElementsByTagName('body')[0];
        body.className = body.className.replace(/\body-loading\b/,'body-loaded');
    };
}
</script>

                                            <script>
                if(window.basicThemeScripts === undefined){ 
                    window.basicThemeScripts = new ThemeScripts(); 
                } 
                basicThemeScripts.initGlobal(); 
                window.basicThemeScripts.init();
                window.TemplateAccessible.init({"dynamicValidity":true});
                window.skelVanilla.init({"bodyLoaded":true,"removeBack":false});
            </script>
            <script type="text/javascript" src="500:%20Internal%20Server%20Error_fichiers/hideemptycolumn.js"></script>
<script type="text/javascript">
/*<![CDATA[*/

            try{ 
                triggerEmClassChange(); 
            } catch(e) {
                console.ls.warn('triggerEmClassChange could not be run. Is survey.js correctly loaded?');
            }

triggerEmRelevance();
jQuery(document).off('pjax:scriptcomplete.mainBottom').on('ready pjax:scriptcomplete.mainBottom', function() {
activateActionLink();
activateConfirmButton();
basicThemeScripts.initTopMenuLanguageChanger('.ls-language-link ', 'form#limesurvey'); 
updateMandatoryErrorClass();
});
/*]]>*/
</script>


</body></html>
CDbException.html (25,789 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>CDbException</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>CDbException</h1>

	<p class="message">
		CDbCommand failed to execute the SQL statement: SQLSTATE[22001]: 
String data, right truncated: 1406 Data too long for column 
'711522X461X6155' at row 1. The SQL statement executed was: UPDATE 
lime_survey_711522 SET `lastpage`=0, 
`711522X461X6155`='CESTFOUTUCOMPLETEMENT' WHERE ID=1	</p>

	<div class="source">
		<p class="file">/mnt/data/shnoulle/nginx/www/master/framework/db/CDbCommand.php(543)</p>
		<div class="code"><pre><span class="ln">531</span>         {
<span class="ln">532</span>             if($this-&gt;_connection-&gt;enableProfiling)
<span class="ln">533</span>                 Yii::endProfile('system.db.CDbCommand.query('.$this-&gt;getText().$par.')','system.db.CDbCommand.query');
<span class="ln">534</span> 
<span class="ln">535</span>             $errorInfo=$e instanceof PDOException ? $e-&gt;errorInfo : null;
<span class="ln">536</span>             $message=$e-&gt;getMessage();
<span class="ln">537</span>             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
<span class="ln">538</span>                 array('{method}'=&gt;$method, '{error}'=&gt;$message, '{sql}'=&gt;$this-&gt;getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
<span class="ln">539</span> 
<span class="ln">540</span>             if(YII_DEBUG)
<span class="ln">541</span>                 $message.='. The SQL statement executed was: '.$this-&gt;getText().$par;
<span class="ln">542</span> 
<span class="error"><span class="ln error-ln">543</span>             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
</span><span class="ln">544</span>                 array('{error}'=&gt;$message)),(int)$e-&gt;getCode(),$errorInfo);
<span class="ln">545</span>         }
<span class="ln">546</span>     }
<span class="ln">547</span> 
<span class="ln">548</span>     /**
<span class="ln">549</span>      * Builds a SQL SELECT statement from the given query specification.
<span class="ln">550</span>      * @param array $query the query specification in name-value pairs. The following
<span class="ln">551</span>      * query options are supported: {@link select}, {@link distinct}, {@link from},
<span class="ln">552</span>      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
<span class="ln">553</span>      * {@link limit}, {@link offset} and {@link union}.
<span class="ln">554</span>      * @throws CDbException if "from" key is not present in given query parameter
<span class="ln">555</span>      * @return string the SQL statement
</pre></div>	</div>

	<div class="traces">
		<h2>Stack Trace</h2>
				<table style="width:100%;">
						<tbody><tr class="trace core collapsed">
			<td class="number">
				#0			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/framework/db/CDbCommand.php(377): <strong>CDbCommand</strong>-&gt;<strong>queryInternal</strong>("", 0, array())				</div>

				<div class="code"><pre><span class="ln">372</span>      * @return CDbDataReader the reader object for fetching the query result
<span class="ln">373</span>      * @throws CException execution failed
<span class="ln">374</span>      */
<span class="ln">375</span>     public function query($params=array())
<span class="ln">376</span>     {
<span class="error"><span class="ln error-ln">377</span>         return $this-&gt;queryInternal('',0,$params);
</span><span class="ln">378</span>     }
<span class="ln">379</span> 
<span class="ln">380</span>     /**
<span class="ln">381</span>      * Executes the SQL statement and returns all rows.
<span class="ln">382</span>      * @param boolean $fetchAssociative whether each row should be returned as an associated array with
</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>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/application/helpers/expressions/em_manager_helper.php(5578): <strong>CDbCommand</strong>-&gt;<strong>query</strong>()				</div>

				<div class="code"><pre><span class="ln">5573</span> 
<span class="ln">5574</span>                     //If the responses already have been submitted once they are marked as completed already, so they shouldn't be changed.
<span class="ln">5575</span>                     $oSurveyResponse = SurveyDynamic::model($this-&gt;sid)-&gt;findByAttributes(['id' =&gt; $_SESSION[$this-&gt;sessid]['srid']]);
<span class="ln">5576</span>                     $result = true;
<span class="ln">5577</span>                     if ($oSurveyResponse-&gt;submitdate == null || Survey::model()-&gt;findByPk($this-&gt;sid)-&gt;alloweditaftercompletion == 'Y') {
<span class="error"><span class="ln error-ln">5578</span>                         $result = !Yii::app()-&gt;db-&gt;createCommand($query)-&gt;query();
</span><span class="ln">5579</span>                         //$result = !dbExecuteAssoc($query);
<span class="ln">5580</span>                     }
<span class="ln">5581</span> 
<span class="ln">5582</span>                     if ($result)
<span class="ln">5583</span>                     {
</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>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/application/helpers/expressions/em_manager_helper.php(5303): <strong>LimeExpressionManager</strong>-&gt;<strong>_UpdateValuesInDatabase</strong>()				</div>

				<div class="code"><pre><span class="ln">5298</span>                             continue;
<span class="ln">5299</span>                         }
<span class="ln">5300</span>                         else
<span class="ln">5301</span>                         {
<span class="ln">5302</span>                             // display new group
<span class="error"><span class="ln error-ln">5303</span>                             $message .= $LEM-&gt;_UpdateValuesInDatabase();
</span><span class="ln">5304</span>                             $LEM-&gt;runtimeTimings[] = array(__METHOD__,(microtime(true) - $now));
<span class="ln">5305</span>                             $LEM-&gt;lastMoveResult = array(
<span class="ln">5306</span>                                 'finished'=&gt;false,
<span class="ln">5307</span>                                 'message'=&gt;$message,
<span class="ln">5308</span>                                 'gseq'=&gt;$LEM-&gt;currentGroupSeq,
</pre></div>			</td>
		</tr>
						<tr class="trace app expanded">
			<td class="number">
				#3			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/application/helpers/SurveyRuntimeHelper.php(835): <strong>LimeExpressionManager</strong>::<strong>NavigateForwards</strong>()				</div>

				<div class="code"><pre><span class="ln">830</span>                     $this-&gt;aMoveResult = false; // so display welcome page again
<span class="ln">831</span>                 }
<span class="ln">832</span>             }
<span class="ln">833</span> 
<span class="ln">834</span>             if ($this-&gt;sMove == "movenext") {
<span class="error"><span class="ln error-ln">835</span>                 $this-&gt;aMoveResult = LimeExpressionManager::NavigateForwards();
</span><span class="ln">836</span>             }
<span class="ln">837</span> 
<span class="ln">838</span>             if (($this-&gt;sMove == 'movesubmit')) {
<span class="ln">839</span>                 if ($this-&gt;sSurveyMode == 'survey') {
<span class="ln">840</span>                     $this-&gt;aMoveResult = LimeExpressionManager::NavigateForwards();
</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>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/application/helpers/SurveyRuntimeHelper.php(534): <strong>SurveyRuntimeHelper</strong>-&gt;<strong>setMoveResult</strong>()				</div>

				<div class="code"><pre><span class="ln">529</span>         $this-&gt;initFirstStep(); // If it's the first time user load this survey, will init session and LEM
<span class="ln">530</span>         $this-&gt;initTotalAndMaxSteps();
<span class="ln">531</span>         $this-&gt;checkIfUseBrowserNav(); // Check if user used browser navigation, or relaoded page
<span class="ln">532</span>         if ($this-&gt;sMove != 'clearcancel' &amp;&amp; $this-&gt;sMove != 'confirmquota') {
<span class="ln">533</span>             $this-&gt;checkPrevStep(); // Check if prev step is set, else set it
<span class="error"><span class="ln error-ln">534</span>             $this-&gt;setMoveResult();
</span><span class="ln">535</span>             $this-&gt;checkClearCancel();
<span class="ln">536</span>             $this-&gt;setPrevStep();
<span class="ln">537</span>             $this-&gt;checkIfFinished();
<span class="ln">538</span>             $this-&gt;setStep();
<span class="ln">539</span> 
</pre></div>			</td>
		</tr>
						<tr class="trace app collapsed">
			<td class="number">
				#5			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/application/helpers/SurveyRuntimeHelper.php(104): <strong>SurveyRuntimeHelper</strong>-&gt;<strong>initMove</strong>()				</div>

				<div class="code"><pre><span class="ln">099</span>         if (!isset($_SESSION[$this-&gt;LEMsessid]['step'])) {
<span class="ln">100</span>             $this-&gt;showTokenOrCaptchaFormsIfNeeded();
<span class="ln">101</span>         }
<span class="ln">102</span> 
<span class="ln">103</span>         $this-&gt;checkForDataSecurityAccepted();
<span class="error"><span class="ln error-ln">104</span>         $this-&gt;initMove(); // main methods to init session, LEM, moves, errors, etc
</span><span class="ln">105</span>         if (!$this-&gt;previewgrp &amp;&amp; !$this-&gt;previewquestion) {
<span class="ln">106</span>             $this-&gt;checkQuotas(); // check quotas (then the process will stop here)
<span class="ln">107</span>             $this-&gt;displayFirstPageIfNeeded();
<span class="ln">108</span>             $this-&gt;saveAllIfNeeded();
<span class="ln">109</span>             $this-&gt;saveSubmitIfNeeded();
</pre></div>			</td>
		</tr>
						<tr class="trace app collapsed">
			<td class="number">
				#6			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/application/controllers/survey/index.php(591): <strong>SurveyRuntimeHelper</strong>-&gt;<strong>run</strong>("711522",
 array("surveyid" =&gt; "711522", "thissurvey" =&gt; array("htmlemail" 
=&gt; "Y", "format" =&gt; "G", "template" =&gt; "skelvanilla", 
"language" =&gt; "en", ...), "thisstep" =&gt; "0", "tokensexist" =&gt; 
0, ...))				</div>

				<div class="code"><pre><span class="ln">586</span>         unset($redata);
<span class="ln">587</span>         $redata = compact(array_keys(get_defined_vars()));
<span class="ln">588</span>         Yii::import('application.helpers.SurveyRuntimeHelper');
<span class="ln">589</span>         $tmp = new SurveyRuntimeHelper();
<span class="ln">590</span>         // try {
<span class="error"><span class="ln error-ln">591</span>             $tmp-&gt;run($surveyid, $redata);
</span><span class="ln">592</span>         // } catch (WrongTemplateVersionException $ex) {
<span class="ln">593</span>         //     echo $ex-&gt;getMessage();
<span class="ln">594</span>         // }
<span class="ln">595</span>     }
<span class="ln">596</span> 
</pre></div>			</td>
		</tr>
						<tr class="trace app collapsed">
			<td class="number">
				#7			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/application/controllers/survey/index.php(24): <strong>index</strong>-&gt;<strong>action</strong>()				</div>

				<div class="code"><pre><span class="ln">19</span>     public $oTemplate;
<span class="ln">20</span> 
<span class="ln">21</span>     public function run()
<span class="ln">22</span>     {
<span class="ln">23</span>         useFirebug();
<span class="error"><span class="ln error-ln">24</span>         $this-&gt;action();
</span><span class="ln">25</span>     }
<span class="ln">26</span> 
<span class="ln">27</span>     public function action()
<span class="ln">28</span>     {
<span class="ln">29</span>         global $surveyid;
</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>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/framework/web/actions/CAction.php(76): <strong>index</strong>-&gt;<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-&gt;getNumberOfParameters()&gt;0)
<span class="ln">74</span>             return $this-&gt;runWithParamsInternal($this, $method, $params);
<span class="ln">75</span> 
<span class="error"><span class="ln error-ln">76</span>         $this-&gt;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">
				#9			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/framework/web/CController.php(308): <strong>CAction</strong>-&gt;<strong>runWithParams</strong>(array("sid" =&gt; "711522"))				</div>

				<div class="code"><pre><span class="ln">303</span>     {
<span class="ln">304</span>         $priorAction=$this-&gt;_action;
<span class="ln">305</span>         $this-&gt;_action=$action;
<span class="ln">306</span>         if($this-&gt;beforeAction($action))
<span class="ln">307</span>         {
<span class="error"><span class="ln error-ln">308</span>             if($action-&gt;runWithParams($this-&gt;getActionParams())===false)
</span><span class="ln">309</span>                 $this-&gt;invalidActionParams($action);
<span class="ln">310</span>             else
<span class="ln">311</span>                 $this-&gt;afterAction($action);
<span class="ln">312</span>         }
<span class="ln">313</span>         $this-&gt;_action=$priorAction;
</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>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/framework/web/CController.php(286): <strong>CController</strong>-&gt;<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-&gt;runAction($action);
</span><span class="ln">287</span>         else
<span class="ln">288</span>         {
<span class="ln">289</span>             $priorAction=$this-&gt;_action;
<span class="ln">290</span>             $this-&gt;_action=$action;
<span class="ln">291</span>             CFilterChain::create($this,$action,$filters)-&gt;run();
</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>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/framework/web/CController.php(265): <strong>CController</strong>-&gt;<strong>runActionWithFilters</strong>(index, array())				</div>

				<div class="code"><pre><span class="ln">260</span>         {
<span class="ln">261</span>             if(($parent=$this-&gt;getModule())===null)
<span class="ln">262</span>                 $parent=Yii::app();
<span class="ln">263</span>             if($parent-&gt;beforeControllerAction($this,$action))
<span class="ln">264</span>             {
<span class="error"><span class="ln error-ln">265</span>                 $this-&gt;runActionWithFilters($action,$this-&gt;filters());
</span><span class="ln">266</span>                 $parent-&gt;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-&gt;missingAction($actionID);
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#12			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/framework/web/CWebApplication.php(282): <strong>CController</strong>-&gt;<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-&gt;_controller;
<span class="ln">280</span>             $this-&gt;_controller=$controller;
<span class="ln">281</span>             $controller-&gt;init();
<span class="error"><span class="ln error-ln">282</span>             $controller-&gt;run($actionID);
</span><span class="ln">283</span>             $this-&gt;_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}'=&gt;$route===''?$this-&gt;defaultController:$route)));
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#13			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/framework/web/CWebApplication.php(141): <strong>CWebApplication</strong>-&gt;<strong>runController</strong>("survey/index/sid/711522")				</div>

				<div class="code"><pre><span class="ln">136</span>             foreach(array_splice($this-&gt;catchAllRequest,1) as $name=&gt;$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-&gt;getUrlManager()-&gt;parseUrl($this-&gt;getRequest());
<span class="error"><span class="ln error-ln">141</span>         $this-&gt;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">
				#14			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/framework/base/CApplication.php(185): <strong>CWebApplication</strong>-&gt;<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-&gt;hasEventHandler('onBeginRequest'))
<span class="ln">183</span>             $this-&gt;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-&gt;processRequest();
</span><span class="ln">186</span>         if($this-&gt;hasEventHandler('onEndRequest'))
<span class="ln">187</span>             $this-&gt;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">
				#15			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/mnt/data/shnoulle/nginx/www/master/index.php(194): <strong>CApplication</strong>-&gt;<strong>run</strong>()				</div>

				<div class="code"><pre><span class="ln">189</span> require_once APPPATH . 'core/LSYii_Application' . EXT;
<span class="ln">190</span> 
<span class="ln">191</span> $config = require_once(APPPATH . 'config/internal' . EXT);
<span class="ln">192</span> 
<span class="ln">193</span> Yii::$enableIncludePath = false;
<span class="error"><span class="ln error-ln">194</span> Yii::createApplication('LSYii_Application', $config)-&gt;run();
</span><span class="ln">195</span> 
<span class="ln">196</span> /* End of file index.php */
<span class="ln">197</span> /* Location: ./index.php */
</pre></div>			</td>
		</tr>
				</tbody></table>
	</div>

	<div class="version">
		2019-03-29 18:35:46 nginx/1.14.2 <a href="http://www.yiiframework.com/">Yii Framework</a>/1.1.20	</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>



</body></html>
CDbException.html (25,789 bytes)   
DenisChenu

DenisChenu

2019-03-30 18:56

developer   ~51222

https://github.com/LimeSurvey/LimeSurvey/pull/1252

DenisChenu

DenisChenu

2019-04-05 08:55

developer   ~51361

merged

Issue History

Date Modified Username Field Change
2019-03-14 11:42 lemeurt New Issue
2019-03-14 12:20 DenisChenu Note Added: 50981
2019-03-14 12:23 DenisChenu Relationship added related to 10827
2019-03-14 12:24 DenisChenu Note Added: 50982
2019-03-15 11:34 lemeurt Note Added: 51002
2019-03-15 11:58 DenisChenu Note Added: 51003
2019-03-15 22:31 lemeurt Note Added: 51021
2019-03-29 19:34 DenisChenu Assigned To => DenisChenu
2019-03-29 19:34 DenisChenu Status new => assigned
2019-03-29 19:37 DenisChenu Database & DB-Version Postgres => Postgres and mariaDB 10.3.12
2019-03-29 19:38 DenisChenu File Added: 500: Internal Server Error.html
2019-03-29 19:38 DenisChenu File Added: CDbException.html
2019-03-29 19:38 DenisChenu File Added: survey_archive_BadDefault.lsa
2019-03-29 19:38 DenisChenu Note Added: 51212
2019-03-30 18:56 DenisChenu Note Added: 51222
2019-04-05 08:55 DenisChenu Status assigned => resolved
2019-04-05 08:55 DenisChenu Resolution open => fixed
2019-04-05 08:55 DenisChenu Fixed in Version => 3.17.x
2019-04-05 08:55 DenisChenu Note Added: 51361
2019-04-24 17:00 DenisChenu Relationship added related to 14768
2019-04-30 09:11 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing