View Issue Details

This bug affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
15934Bug reportsImport/Exportpublic2020-03-13 18:43
Reporterandreicad Assigned Toc_schmitz  
PrioritynoneSeverityblock 
Status closedResolutionduplicate 
Product Version4.1.7 
Summary15934: Exporting survey responses leads to 'CDbCommand failed to execute the SQL Statement'
Description

Upgraded on-premise hosted LimeSurvey from v3.19.2 to v4.1.7 (Git commit 10454b9ffd90dd23c1673253199051a145dc97f9).
After the upgrade, a regression was observed. Attempting to export an existing survey's responses to CSV format fails with the following error:

CDbCommand failed to execute the SQL statement: SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "answerl10ns"

Steps To Reproduce
  1. Select an existing survey, click 'Response' > 'Responses & Statistics'.
  2. Click 'Export' > 'Export responses'
  3. On the 'Export results' page, select Export format = CSV, and click the 'Export' button

Expected results:
The survey responses are exported.

Observed results:
LimeSurvey crashes with an HTTP 500 error, displaying the following message:
CDbCommand failed to execute the SQL statement: SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "answerl10ns"

Additional Information

Enabling debug=2 and debugsql=1, the attached report was obtained (CDbException.html)

The SQL statement that appears to be causing the issue is:

SELECT "t"."aid" AS "t0_c0", "t"."qid" AS "t0_c1", "t"."code" AS "t0_c2", "t"."sortorder" AS "t0_c3", "t"."assessment_value" AS "t0_c4", "t"."scale_id" AS "t0_c5", "answerL10ns"."id" AS "t1_c0", "answerL10ns"."aid" AS "t1_c1", "answerL10ns"."answer" AS "t1_c2", "answerL10ns"."language" AS "t1_c3", "question"."qid" AS "t2_c0", "question"."parent_qid" AS "t2_c1", "question"."sid" AS "t2_c2", "question"."gid" AS "t2_c3", "question"."type" AS "t2_c4", "question"."title" AS "t2_c5", "question"."preg" AS "t2_c6", "question"."other" AS "t2_c7", "question"."mandatory" AS "t2_c8", "question"."question_order" AS "t2_c9", "question"."scale_id" AS "t2_c10", "question"."same_default" AS "t2_c11", "question"."relevance" AS "t2_c12", "question"."modulename" AS "t2_c13", "question"."encrypted" AS "t2_c14" FROM "answers" "t" LEFT OUTER JOIN "answer_l10ns" "answerL10ns" ON ("answerL10ns"."aid"="t"."aid") LEFT OUTER JOIN "questions" "question" ON (t.qid = question.qid) WHERE (question.sid=534913 AND answerL10ns.language = 'en') ORDER BY question.question_order, t.scale_id, sortorder

TagsNo tags attached.
Attached Files
LimeSurvey-error-message.png (72,860 bytes)   
LimeSurvey-error-message.png (72,860 bytes)   
CDbException.html (32,738 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[42P01]: 
Undefined table: 7 ERROR:  missing FROM-clause entry for table 
"answerl10ns"<br>
LINE 1: ...id = question.qid) WHERE (question.sid=534913 AND answerL10n...<br>
                                                             ^. The SQL 
statement executed was: SELECT "t"."aid" AS "t0_c0", "t"."qid" AS 
"t0_c1", "t"."code" AS "t0_c2", "t"."sortorder" AS "t0_c3", 
"t"."assessment_value" AS "t0_c4", "t"."scale_id" AS "t0_c5", 
"answerL10ns"."id" AS "t1_c0", "answerL10ns"."aid" AS "t1_c1", 
"answerL10ns"."answer" AS "t1_c2", "answerL10ns"."language" AS "t1_c3", 
"question"."qid" AS "t2_c0", "question"."parent_qid" AS "t2_c1", 
"question"."sid" AS "t2_c2", "question"."gid" AS "t2_c3", 
"question"."type" AS "t2_c4", "question"."title" AS "t2_c5", 
"question"."preg" AS "t2_c6", "question"."other" AS "t2_c7", 
"question"."mandatory" AS "t2_c8", "question"."question_order" AS 
"t2_c9", "question"."scale_id" AS "t2_c10", "question"."same_default" AS
 "t2_c11", "question"."relevance" AS "t2_c12", "question"."modulename" 
AS "t2_c13", "question"."encrypted" AS "t2_c14" FROM "answers" "t"  LEFT
 OUTER JOIN "answer_l10ns" "answerL10ns" ON 
("answerL10ns"."aid"="t"."aid") LEFT OUTER JOIN "questions" "question" 
ON (t.qid = question.qid) WHERE (question.sid=534913 AND 
answerL10ns.language = 'en') ORDER BY question.question_order, 
t.scale_id, sortorder	</p>

	<div class="source">
		<p class="file">/var/www/html/sg_survey-test/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;/var/www/html/sg_survey-test/framework/db/CDbCommand.php(396): <strong>CDbCommand</strong>-&gt;<strong>queryInternal</strong>("fetchAll", array(2), array())				</div>

				<div class="code"><pre><span class="ln">391</span>      * An empty array is returned if the query results in nothing.
<span class="ln">392</span>      * @throws CException execution failed
<span class="ln">393</span>      */
<span class="ln">394</span>     public function queryAll($fetchAssociative=true,$params=array())
<span class="ln">395</span>     {
<span class="error"><span class="ln error-ln">396</span>         return $this-&gt;queryInternal('fetchAll',$fetchAssociative ? $this-&gt;_fetchMode : PDO::FETCH_NUM, $params);
</span><span class="ln">397</span>     }
<span class="ln">398</span> 
<span class="ln">399</span>     /**
<span class="ln">400</span>      * Executes the SQL statement and returns the first row of the result.
<span class="ln">401</span>      * This is a convenient method of {@link query} when only the first row of data is needed.
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#1			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/framework/db/ar/CActiveFinder.php(810): <strong>CDbCommand</strong>-&gt;<strong>queryAll</strong>()				</div>

				<div class="code"><pre><span class="ln">805</span>      * @param CJoinQuery $query the query to be executed.
<span class="ln">806</span>      */
<span class="ln">807</span>     public function runQuery($query)
<span class="ln">808</span>     {
<span class="ln">809</span>         $command=$query-&gt;createCommand($this-&gt;_builder);
<span class="error"><span class="ln error-ln">810</span>         foreach($command-&gt;queryAll() as $row)
</span><span class="ln">811</span>             $this-&gt;populateRecord($query,$row);
<span class="ln">812</span>     }
<span class="ln">813</span> 
<span class="ln">814</span>     /**
<span class="ln">815</span>      * Populates the active records with the query data.
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#2			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/framework/db/ar/CActiveFinder.php(441): <strong>CJoinElement</strong>-&gt;<strong>runQuery</strong>(CJoinQuery)				</div>

				<div class="code"><pre><span class="ln">436</span>         {
<span class="ln">437</span>             $query=new CJoinQuery($this,$criteria);
<span class="ln">438</span>             $this-&gt;_finder-&gt;baseLimited=($criteria-&gt;offset&gt;=0 || $criteria-&gt;limit&gt;=0);
<span class="ln">439</span>             $this-&gt;buildQuery($query);
<span class="ln">440</span>             $this-&gt;_finder-&gt;baseLimited=false;
<span class="error"><span class="ln error-ln">441</span>             $this-&gt;runQuery($query);
</span><span class="ln">442</span>         }
<span class="ln">443</span>         elseif(!$this-&gt;_joined &amp;&amp; !empty($this-&gt;_parent-&gt;records)) // not joined before
<span class="ln">444</span>         {
<span class="ln">445</span>             $query=new CJoinQuery($this-&gt;_parent);
<span class="ln">446</span>             $this-&gt;_joined=true;
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#3			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/framework/db/ar/CActiveFinder.php(68): <strong>CJoinElement</strong>-&gt;<strong>find</strong>(CDbCriteria)				</div>

				<div class="code"><pre><span class="ln">63</span>         {
<span class="ln">64</span>             $this-&gt;_joinTree-&gt;tableAlias=$criteria-&gt;alias;
<span class="ln">65</span>             $this-&gt;_joinTree-&gt;rawTableAlias=$this-&gt;_builder-&gt;getSchema()-&gt;quoteTableName($criteria-&gt;alias);
<span class="ln">66</span>         }
<span class="ln">67</span> 
<span class="error"><span class="ln error-ln">68</span>         $this-&gt;_joinTree-&gt;find($criteria);
</span><span class="ln">69</span>         $this-&gt;_joinTree-&gt;afterFind();
<span class="ln">70</span> 
<span class="ln">71</span>         if($all)
<span class="ln">72</span>         {
<span class="ln">73</span>             $result = array_values($this-&gt;_joinTree-&gt;records);
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#4			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/framework/db/ar/CActiveRecord.php(1364): <strong>CActiveFinder</strong>-&gt;<strong>query</strong>(CDbCriteria, true)				</div>

				<div class="code"><pre><span class="ln">1359</span>             return $all ? $this-&gt;populateRecords($command-&gt;queryAll(), true, $criteria-&gt;index) : $this-&gt;populateRecord($command-&gt;queryRow());
<span class="ln">1360</span>         }
<span class="ln">1361</span>         else
<span class="ln">1362</span>         {
<span class="ln">1363</span>             $finder=$this-&gt;getActiveFinder($criteria-&gt;with);
<span class="error"><span class="ln error-ln">1364</span>             return $finder-&gt;query($criteria,$all);
</span><span class="ln">1365</span>         }
<span class="ln">1366</span>     }
<span class="ln">1367</span> 
<span class="ln">1368</span>     /**
<span class="ln">1369</span>      * Applies the query scopes to the given criteria.
</pre></div>			</td>
		</tr>
						<tr class="trace app expanded">
			<td class="number">
				#5			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/application/models/LSActiveRecord.php(74): <strong>CActiveRecord</strong>-&gt;<strong>query</strong>(CDbCriteria, true)				</div>

				<div class="code"><pre><span class="ln">69</span>      * @since 1.1.7
<span class="ln">70</span>      */
<span class="ln">71</span>     protected function query($criteria, $all = false, $asAR = true)
<span class="ln">72</span>     {
<span class="ln">73</span>         if ($asAR === true) {
<span class="error"><span class="ln error-ln">74</span>             return parent::query($criteria, $all);
</span><span class="ln">75</span>         } else {
<span class="ln">76</span>             $this-&gt;beforeFind();
<span class="ln">77</span>             $this-&gt;applyScopes($criteria);
<span class="ln">78</span>             if (!$all) {
<span class="ln">79</span>                 $criteria-&gt;limit = 1;
</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>
										&nbsp;/var/www/html/sg_survey-test/framework/db/ar/CActiveRecord.php(1478): <strong>LSActiveRecord</strong>-&gt;<strong>query</strong>(CDbCriteria, true)				</div>

				<div class="code"><pre><span class="ln">1473</span>      */
<span class="ln">1474</span>     public function findAll($condition='',$params=array())
<span class="ln">1475</span>     {
<span class="ln">1476</span>         Yii::trace(get_class($this).'.findAll()','system.db.ar.CActiveRecord');
<span class="ln">1477</span>         $criteria=$this-&gt;getCommandBuilder()-&gt;createCriteria($condition,$params);
<span class="error"><span class="ln error-ln">1478</span>         return $this-&gt;query($criteria,true);
</span><span class="ln">1479</span>     }
<span class="ln">1480</span> 
<span class="ln">1481</span>     /**
<span class="ln">1482</span>      * Finds a single active record with the specified primary key.
<span class="ln">1483</span>      * See {@link find()} for detailed explanation about $condition and $params.
</pre></div>			</td>
		</tr>
						<tr class="trace app expanded">
			<td class="number">
				#7			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/application/helpers/admin/export/SurveyDao.php(46): <strong>CActiveRecord</strong>-&gt;<strong>findAll</strong>(array("condition"
 =&gt; "question.sid=534913 AND answerL10ns.language = 'en'", "order" 
=&gt; "question.question_order, t.scale_id, sortorder"))				</div>

				<div class="code"><pre><span class="ln">41</span>             safeDie("An invalid survey ID was encountered");
<span class="ln">42</span>         }
<span class="ln">43</span> 
<span class="ln">44</span>         $survey-&gt;groups = QuestionGroup::model()-&gt;findAll(array("condition" =&gt; 'sid='.$intId, 'order'=&gt;'group_order'));
<span class="ln">45</span>         $survey-&gt;questions = Question::model()-&gt;findAll(array("condition" =&gt; 'sid='.$intId, 'order'=&gt;'question_order'));
<span class="error"><span class="ln error-ln">46</span>         $aAnswers = Answer::model()-&gt;with('answerL10ns', 'question')-&gt;findAll(array('condition'=&gt;'question.sid='.$intId.' AND answerL10ns.language = \''.$lang.'\'', 'order' =&gt; 'question.question_order, t.scale_id, sortorder'));
</span><span class="ln">47</span>         foreach ($aAnswers as $aAnswer) {
<span class="ln">48</span>             if(!empty($oOptions-&gt;stripHtmlCode) &amp;&amp; $oOptions-&gt;stripHtmlCode == 1  &amp;&amp; Yii::app()-&gt;controller-&gt;action-&gt;id !='remotecontrol'){
<span class="ln">49</span>                 $answer=stripTagsFull($aAnswer-&gt;answerL10ns[$lang]-&gt;answer);
<span class="ln">50</span>             } else {
<span class="ln">51</span>                 $answer=$aAnswer-&gt;answerL10ns[$lang]-&gt;answer;
</pre></div>			</td>
		</tr>
						<tr class="trace app expanded">
			<td class="number">
				#8			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/application/helpers/admin/exportresults_helper.php(102): <strong>SurveyDao</strong>-&gt;<strong>loadSurveyById</strong>("534913", "en", FormattingOptions)				</div>

				<div class="code"><pre><span class="ln">097</span>         if (!($writer instanceof IWriter)) {
<span class="ln">098</span>             throw new Exception(sprintf('Writer for %s should implement IWriter', $sExportPlugin));
<span class="ln">099</span>         }
<span class="ln">100</span> 
<span class="ln">101</span>         $surveyDao = new SurveyDao();
<span class="error"><span class="ln error-ln">102</span>         $survey = $surveyDao-&gt;loadSurveyById($iSurveyId, $sLanguageCode, $oOptions);
</span><span class="ln">103</span>         $writer-&gt;init($survey, $sLanguageCode, $oOptions);
<span class="ln">104</span>         
<span class="ln">105</span>         $surveyDao-&gt;loadSurveyResults($survey, $oOptions-&gt;responseMinRecord, $oOptions-&gt;responseMaxRecord, $sFilter, $oOptions-&gt;responseCompletionState, $oOptions-&gt;selectedColumns, $oOptions-&gt;aResponses);
<span class="ln">106</span>         $writer-&gt;write($survey, $sLanguageCode, $oOptions, true);
<span class="ln">107</span>         $result = $writer-&gt;close();
</pre></div>			</td>
		</tr>
						<tr class="trace app collapsed">
			<td class="number">
				#9			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/application/controllers/admin/export.php(337): <strong>ExportSurveyResultsService</strong>-&gt;<strong>exportResponses</strong>("534913", "en", "csv", FormattingOptions, ...)				</div>

				<div class="code"><pre><span class="ln">332</span>         } else {
<span class="ln">333</span>             $sFilter = '';
<span class="ln">334</span>         }
<span class="ln">335</span> 
<span class="ln">336</span>         viewHelper::disableHtmlLogging();
<span class="error"><span class="ln error-ln">337</span>         $resultsService-&gt;exportResponses($iSurveyID, $explang, $sExportType, $options, $sFilter);
</span><span class="ln">338</span> 
<span class="ln">339</span>         Yii::app()-&gt;end();
<span class="ln">340</span>     }
<span class="ln">341</span> 
<span class="ln">342</span>     /*
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#10			</td>
			<td class="content">
				<div class="trace-file">
										&nbsp;unknown(0): <strong>export</strong>-&gt;<strong>exportresults</strong>()				</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;/var/www/html/sg_survey-test/framework/web/actions/CAction.php(109): <strong>ReflectionMethod</strong>-&gt;<strong>invokeArgs</strong>(export, array())				</div>

				<div class="code"><pre><span class="ln">104</span>             elseif($param-&gt;isDefaultValueAvailable())
<span class="ln">105</span>                 $ps[]=$param-&gt;getDefaultValue();
<span class="ln">106</span>             else
<span class="ln">107</span>                 return false;
<span class="ln">108</span>         }
<span class="error"><span class="ln error-ln">109</span>         $method-&gt;invokeArgs($object,$ps);
</span><span class="ln">110</span>         return true;
<span class="ln">111</span>     }
<span class="ln">112</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>
										&nbsp;/var/www/html/sg_survey-test/application/core/Survey_Common_Action.php(86): <strong>CAction</strong>-&gt;<strong>runWithParamsInternal</strong>(export,
 ReflectionMethod, array("r" =&gt; 
"admin/export/sa/exportresults/surveyid/534913", "sa" =&gt; 
"exportresults", "surveyid" =&gt; 534913, "iSurveyId" =&gt; 534913, 
...))				</div>

				<div class="code"><pre><span class="ln">81</span>             $oMethod = new ReflectionMethod($this, $sDefault);
<span class="ln">82</span>         }
<span class="ln">83</span> 
<span class="ln">84</span>         // We're all good to go, let's execute it
<span class="ln">85</span>         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
<span class="error"><span class="ln error-ln">86</span>         return parent::runWithParamsInternal($this, $oMethod, $params);
</span><span class="ln">87</span>     }
<span class="ln">88</span> 
<span class="ln">89</span>     /**
<span class="ln">90</span>      * Some functions have different parameters, which are just an alias of the
<span class="ln">91</span>      * usual parameters we're getting in the url. This function just populates
</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;/var/www/html/sg_survey-test/framework/web/CController.php(308): <strong>Survey_Common_Action</strong>-&gt;<strong>runWithParams</strong>(array("r"
 =&gt; "admin/export/sa/exportresults/surveyid/534913", "sa" =&gt; 
"exportresults", "surveyid" =&gt; 534913, "iSurveyId" =&gt; 534913, 
...))				</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">
				#14			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/framework/web/CController.php(286): <strong>CController</strong>-&gt;<strong>runAction</strong>(export)				</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">
				#15			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/framework/web/CController.php(265): <strong>CController</strong>-&gt;<strong>runActionWithFilters</strong>(export, 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 app collapsed">
			<td class="number">
				#16			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/application/controllers/AdminController.php(165): <strong>CController</strong>-&gt;<strong>run</strong>("export")				</div>

				<div class="code"><pre><span class="ln">160</span>         }
<span class="ln">161</span> 
<span class="ln">162</span>         $this-&gt;runModuleController($action);
<span class="ln">163</span> 
<span class="ln">164</span> 
<span class="error"><span class="ln error-ln">165</span>         return parent::run($action);
</span><span class="ln">166</span>     }
<span class="ln">167</span> 
<span class="ln">168</span>     /**
<span class="ln">169</span>      * Starting with LS4, 3rd party developper can extends any of the LimeSurve controllers.
<span class="ln">170</span>      */
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#17			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/framework/web/CWebApplication.php(282): <strong>AdminController</strong>-&gt;<strong>run</strong>("export")				</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">
				#18			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/framework/web/CWebApplication.php(141): <strong>CWebApplication</strong>-&gt;<strong>runController</strong>("admin/export/sa/exportresults/surveyid/534913")				</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">
				#19			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/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">
				#20			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/var/www/html/sg_survey-test/index.php(195): <strong>CApplication</strong>-&gt;<strong>run</strong>()				</div>

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

	<div class="version">
		2020-02-27 11:53:33 nginx/1.14.0 <a href="http://www.yiiframework.com/">Yii Framework</a>/1.1.22-dev	</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 (32,738 bytes)   
Bug heat0
Complete LimeSurvey version number (& build)4.1.7 (Git commit 10454b9ffd90dd23c1673253199051a145dc97f9)
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgreSQL 10
Server OS (if known)Ubuntu 18.04.4 LTS
Webserver software & version (if known)nginx/1.14.0
PHP VersionPHP Version 7.2.24-0ubuntu0.18.04.3

Relationships

duplicate of 15742 closedc_schmitz RC export_responses fails with "undefined table" 

Users monitoring this issue

There are no users monitoring this issue.

Activities

Issue History

Date Modified Username Field Change
2020-03-01 12:38 andreicad New Issue
2020-03-01 12:38 andreicad File Added: LimeSurvey-error-message.png
2020-03-01 12:38 andreicad File Added: CDbException.html
2020-03-13 18:43 c_schmitz Assigned To => c_schmitz
2020-03-13 18:43 c_schmitz Status new => closed
2020-03-13 18:43 c_schmitz Resolution open => duplicate
2020-03-13 18:43 c_schmitz Relationship added duplicate of 15742