View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
12437Bug reportsSurvey editingpublic2017-07-21 17:12
Reportertammo Assigned Totammo  
PrioritynoneSeveritycrash 
Status closedResolutionopen 
Product Version3.0.x 
Target Version3.0.x 
Summary12437: Crash on survey with 2 MC questions
Description

CDbException

The table "{{survey_319294}}" for active record class "SurveyDynamic" cannot be found in the database.

D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\db\ar\CActiveRecord.php(2387)

2375
2376 /*
2377
Constructor.
2378 @param CActiveRecord $model the model instance
2379
@throws CDbException if specified table for active record class cannot be found in the database
2380 */
2381 public function __construct($model)
2382 {
2383 $this->_modelClassName=get_class($model);
2384
2385 $tableName=$model->tableName();
2386 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2387 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2388 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName)));
2389
2390 if(($modelPk=$model->primaryKey())!==null || $table->primaryKey===null)
2391 {
2392 $table->primaryKey=$modelPk;
2393 if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2394 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2395 elseif(is_array($table->primaryKey))
2396 {
2397 foreach($table->primaryKey as $name)
2398 {
2399 if(isset($table->columns[$name]))

Stack Trace
#0
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\db\ar\CActiveRecord.php(411): CActiveRecordMetaData->__construct(SurveyDynamic)
#1
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\db\ar\CActiveRecord.php(680): CActiveRecord->getMetaData()
#2

D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\application\models\LSActiveRecord.php(29): CActiveRecord->hasAttribute("created")

24 @return array
25
/
26 public function behaviors()
27 {
28 $aBehaviors=array();
29 $sCreateFieldName=($this->hasAttribute('created')?'created':null);
30 $sUpdateFieldName=($this->hasAttribute('modified')?'modified':null);
31 $sDriverName = Yii::app()->db->getDriverName();
32 if ($sDriverName=='sqlsrv' || $sDriverName=='dblib') {
33 $sTimestampExpression=new CDbExpression('GETDATE()');
34 }

#3
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\db\ar\CActiveRecord.php(396): LSActiveRecord->behaviors()
#4

D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\application\models\SurveyDynamic.php(45): CActiveRecord::model("SurveyDynamic")

40 if (!is_null($sid)) {
41 self::sid($sid);
42 $refresh = true;
43 }
44
45 $model = parent::model(CLASS);
46
47 //We need to refresh if we changed sid
48 if ($refresh === true) $model->refreshMetaData();
49
50 return $model;

#5

D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\application\core\LSETwigViewRenderer.php(194): SurveyDynamic::model("319294")

189 if (!empty($aDatas['aSurveyInfo']['sid'])){
190 $surveyid = $aDatas['aSurveyInfo']['sid'];
191 $event->set('surveyId', $aDatas['aSurveyInfo']['sid']);
192
193 if (!empty($SESSION['survey'.$surveyid]['srid'])){
194 $aDatas['aSurveyInfo']['bShowClearAll'] = ! SurveyDynamic::model($surveyid)->isCompleted($SESSION['survey'.$surveyid]['srid']);
195 }
196
197 }
198
199 App()->getPluginManager()->dispatchEvent($event);

#6
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\application\core\LSETwigViewRenderer.php(144): LSETwigViewRenderer->renderTemplateFromString("{# LimeSurvey Copyright (C) 2007-2017 The LimeSurvey P...", array("aSurveyInfo" => array("template" => "default", "language" => "en", "sid" => "319294", "owner_id" => "1", ...)), false)
#7
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\application\helpers\SurveyRuntimeHelper.php(449): LSETwigViewRenderer->renderTemplateFromFile("layout_main.twig", array("aSurveyInfo" => array("template" => "default", "language" => "en", "sid" => "319294", "owner_id" => "1", ...)), false)
#8
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\application\controllers\survey\index.php(580): SurveyRuntimeHelper->run("319294", array("surveyid" => "319294", "thissurvey" => array("template" => "default", "language" => "en", "sid" => "319294", "owner_id" => "1", ...), "thisstep" => null, "tokensexist" => 0, ...))
#9
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\application\controllers\survey\index.php(21): index->action()
#10
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\web\actions\CAction.php(76): index->run()
#11
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\web\CController.php(308): CAction->runWithParams(array("lang" => "en", "sid" => "319294"))
#12
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\web\CController.php(286): CController->runAction(index)
#13
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\web\CController.php(265): CController->runActionWithFilters(index, array())
#14
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\web\CWebApplication.php(282): CController->run("index")
#15
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\web\CWebApplication.php(141): CWebApplication->runController("survey/index/sid/319294")
#16
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\framework\base\CApplication.php(185): CWebApplication->processRequest()
#17
+
D:\Dropbox\sites\limegit.toolsforresearch.com\public_html\index.php(205): CApplication->run()
2017-05-26 21:12:38 Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.5.30 Yii Framework/1.1.17

Steps To Reproduce

Install attached survey (sid = 319294) and try to preview using link in survey overview

I was trying to test the behaviour of MS questions

I copied the survey to sid = 566935 and this does not crash, but does not show content of first group. It does show the title (se attached image)

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)3.0.0-alpha
I will donate to the project if issue is resolvedNo
Browserff
Database type & versionff
Server OS (if known)ff
Webserver software & version (if known)ff
PHP Versionff

Users monitoring this issue

There are no users monitoring this issue.

Activities

tammo

tammo

2017-05-26 21:36

developer   ~43729

Further investigation: it seems to occur only on my local installation (http://localhost.limegit which is on XAMPP, Windows10), it does not happen on http://limegit.toolsforresearch.com, which is on a Linux server.

tammo

tammo

2017-06-21 12:21

developer   ~43959

Solved through another bug fix.

tammo

tammo

2017-07-01 11:42

developer   ~43994

Does not happen anymore in current GIT version.

c_schmitz

c_schmitz

2017-07-21 17:12

administrator   ~44197

Version 3.0.0-beta.1 released

Issue History

Date Modified Username Field Change
2017-05-26 21:21 tammo New Issue
2017-05-26 21:21 tammo Status new => assigned
2017-05-26 21:21 tammo Assigned To => LouisGac
2017-05-26 21:21 tammo File Added: limesurvey_survey_566935.lss
2017-05-26 21:21 tammo File Added: screenshot-localhost.limegit-2017-05-26-21-19-11.png
2017-05-26 21:21 tammo File Added: limesurvey_survey_319294.lss
2017-05-26 21:36 tammo Note Added: 43729
2017-06-21 12:21 tammo Note Added: 43959
2017-07-01 11:42 tammo Assigned To LouisGac => tammo
2017-07-01 11:42 tammo Reproducibility have not tried => unable to reproduce
2017-07-01 11:42 tammo Status assigned => resolved
2017-07-01 11:42 tammo Note Added: 43994
2017-07-21 17:12 c_schmitz Note Added: 44197
2017-07-21 17:12 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing