Description | If try to test a survey, get the following error:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ls2.lime_survey_722461' doesn't exist in C:\xampp\htdocs\ls2\framework\db\CDbCommand.php on line 497 Call Stack #TimeMemoryFunctionLocation 10.0009352160{main}( )..\index.php:0 20.03332018784CApplication->run( )..\index.php:171 30.03332018784CWebApplication->processRequest( )..\CApplication.php:162 40.03412018872CWebApplication->runController( )..\CWebApplication.php:135 50.196914545744CController->run( )..\CWebApplication.php:276 60.201414902400CController->runActionWithFilters( )..\CController.php:266 70.201414902400CController->runAction( )..\CController.php:287 80.201414902400CAction->runWithParams( )..\CController.php:309 90.201514902936index->run( )..\CAction.php:75 100.201514902936index->action( )..\index.php:18 110.325916559424SurveyRuntimeHelper->run( )..\index.php:674 120.412418972840display_first_page( )..\SurveyRuntimeHelper.php:241 130.437318631008templatereplace( )..\frontend_helper.php:2726 140.440318757632Survey_dynamic::model( )..\replacements_helper.php:406 150.440318757720CActiveRecord::model( )..\Survey_dynamic.php:37 160.440318759208CActiveRecordMetaData->construct( )..\CActiveRecord.php:379 170.440418759272CDbSchema->getTable( )..\CActiveRecord.php:2263 180.440418759384CMysqlSchema->loadTable( )..\CDbSchema.php:104 190.440518760200CMysqlSchema->findColumns( )..\CMysqlSchema.php:120 200.440518761208CDbCommand->queryAll( )..\CMysqlSchema.php:160 210.440518761584CDbCommand->queryInternal( )..\CDbCommand.php:390 220.440618763064PDOStatement->execute( )..\CDbCommand.php:497 ( ! ) CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ls2.lime_survey_722461' doesn't exist. The SQL statement executed was: SHOW COLUMNS FROM lime_survey_722461 in C:\xampp\htdocs\ls2\framework\db\CDbCommand.php on line 528 Call Stack #TimeMemoryFunctionLocation 10.0009352160{main}( )..\index.php:0 20.03332018784CApplication->run( )..\index.php:171 30.03332018784CWebApplication->processRequest( )..\CApplication.php:162 40.03412018872CWebApplication->runController( )..\CWebApplication.php:135 50.196914545744CController->run( )..\CWebApplication.php:276 60.201414902400CController->runActionWithFilters( )..\CController.php:266 70.201414902400CController->runAction( )..\CController.php:287 80.201414902400CAction->runWithParams( )..\CController.php:309 90.201514902936index->run( )..\CAction.php:75 100.201514902936index->action( )..\index.php:18 110.325916559424SurveyRuntimeHelper->run( )..\index.php:674 120.412418972840display_first_page( )..\SurveyRuntimeHelper.php:241 130.437318631008templatereplace( )..\frontend_helper.php:2726 140.440318757632Survey_dynamic::model( )..\replacements_helper.php:406 150.440318757720CActiveRecord::model( )..\Survey_dynamic.php:37 160.440318759208CActiveRecordMetaData->construct( )..\CActiveRecord.php:379 170.440418759272CDbSchema->getTable( )..\CActiveRecord.php:2263 180.440418759384CMysqlSchema->loadTable( )..\CDbSchema.php:104 190.440518760200CMysqlSchema->findColumns( )..\CMysqlSchema.php:120 200.440518761208CDbCommand->queryAll( )..\CMysqlSchema.php:160 210.440518761584CDbCommand->queryInternal( )..\CDbCommand.php:390 ( ! ) CDbException: The table "{{survey_722461}}" for active record class "Survey_dynamic" cannot be found in the database. in C:\xampp\htdocs\ls2\framework\db\ar\CActiveRecord.php on line 2264 Call Stack #TimeMemoryFunctionLocation 10.0009352160{main}( )..\index.php:0 20.03332018784CApplication->run( )..\index.php:171 30.03332018784CWebApplication->processRequest( )..\CApplication.php:162 40.03412018872CWebApplication->runController( )..\CWebApplication.php:135 50.196914545744CController->run( )..\CWebApplication.php:276 60.201414902400CController->runActionWithFilters( )..\CController.php:266 70.201414902400CController->runAction( )..\CController.php:287 80.201414902400CAction->runWithParams( )..\CController.php:309 90.201514902936index->run( )..\CAction.php:75 100.201514902936index->action( )..\index.php:18 110.325916559424SurveyRuntimeHelper->run( )..\index.php:674 120.412418972840display_first_page( )..\SurveyRuntimeHelper.php:241 130.437318631008templatereplace( )..\frontend_helper.php:2726 140.440318757632Survey_dynamic::model( )..\replacements_helper.php:406 150.440318757720CActiveRecord::model( )..\Survey_dynamic.php:37 160.440318759208CActiveRecordMetaData->__construct( )..\CActiveRecord.php:379 |
---|
Additional Information | CDbException
The table "{{survey_722461}}" for active record class "Survey_dynamic" cannot be found in the database.
C:\xampp\htdocs\ls2\framework\db\ar\CActiveRecord.php(2264)
2252 private $_model;
2253
2254 /*
2255 Constructor.
2256 @param CActiveRecord $model the model instance
2257 /
2258 public function __construct($model)
2259 {
2260 $this->_model=$model;
2261
2262 $tableName=$model->tableName();
2263 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2264 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2265 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2266 if($table->primaryKey===null)
2267 {
2268 $table->primaryKey=$model->primaryKey();
2269 if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2270 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2271 else if(is_array($table->primaryKey))
2272 {
2273 foreach($table->primaryKey as $name)
2274 {
2275 if(isset($table->columns[$name]))
2276 $table->columns[$name]->isPrimaryKey=true;
Stack Trace
#0
- C:\xampp\htdocs\ls2\framework\db\ar\CActiveRecord.php(379): CActiveRecordMetaData->construct(Survey_dynamic)
#1
– C:\xampp\htdocs\ls2\application\models\Survey_dynamic.php(37): CActiveRecord::model("Survey_dynamic")
32 if (!is_null($sid)) {
33 self::sid($sid);
34 $refresh = true;
35 }
36
37 $model = parent::model(CLASS__);
38
39 //We need to refresh if we changed sid
40 if ($refresh === true) $model->refreshMetaData();
41 return $model;
42 }
#2
– C:\xampp\htdocs\ls2\application\helpers\replacements_helper.php(406): Survey_dynamic::model("722461")
401
402 if(isset($surveyid) && !isset($saved_id) && isset($SESSION['survey'.$surveyid]['srid']))
403 {
404 $saved_id=$SESSION['survey'.$surveyid]['srid'];
405 }
406 if (isset($surveyid) && !Survey_dynamic::model($surveyid)->isCompleted(isset($saved_id) ? $saved_id : 0))
407 {
408 $_clearall = "<input type='button' name='clearallbtn' value='" . $clang->gT("Exit and Clear Survey") . "' class='clearall' "
409 . "onclick=\"if (confirm('" . $clang->gT("Are you sure you want to clear all your responses?", 'js') . "')) {\nwindow.open('".Yii::app()->getController()->createUrl("survey/index/sid/$surveyid?move=clearall&lang=" . $s_lang);
410
411 if (returnGlobal('token'))
#3
– C:\xampp\htdocs\ls2\application\helpers\frontend_helper.php(2726): templatereplace("<meta http-equiv="content-type" content="text/html; charset=UTF-...", array(), array("thistpl" => "C:\xampp\htdocs\ls2\templates/default", "token" => null, "surveyid" => "722461", "thissurvey" => array("surveyls_survey_id" => "722461", "surveyls_language" => "en", "surveyls_title" => "LS2 Validation Samples", "surveyls_description" => "This demonstrates how Expression Manager can support dynamic val...", ...), ...), "frontend_helper[2757]")
2721
2722 LimeExpressionManager::StartProcessingPage();
2723 LimeExpressionManager::StartProcessingGroup(-1, false, $surveyid); // start on welcome page
2724
2725 $redata = compact(array_keys(get_defined_vars()));
2726 echo templatereplace(file_get_contents("$thistpl/startpage.pstpl"),array(),$redata,'frontend_helper[2757]');
2727 echo "\n<form method='post' action='".Yii::app()->getController()->createUrl("/survey/index")."' id='limesurvey' name='limesurvey' autocomplete='off'>\n";
2728
2729 echo "\n\n<!-- START THE SURVEY -->\n";
2730
2731 echo templatereplace(file_get_contents("$thistpl/welcome.pstpl"),array(),$redata,'frontend_helper[2762]')."\n";
#4
- C:\xampp\htdocs\ls2\application\helpers\SurveyRuntimeHelper.php(241): display_first_page()
#5
- C:\xampp\htdocs\ls2\application\controllers\survey\index.php(674): SurveyRuntimeHelper->run("722461", array("surveyid" => "722461", "thistpl" => "C:\xampp\htdocs\ls2\templates/default", "totalquestions" => null, "thissurvey" => array("surveyls_survey_id" => "722461", "surveyls_language" => "en", "surveyls_title" => "LS2 Validation Samples", "surveyls_description" => "This demonstrates how Expression Manager can support dynamic val...", ...), ...))
#6
- C:\xampp\htdocs\ls2\application\controllers\survey\index.php(18): index->action()
#7
- C:\xampp\htdocs\ls2\framework\web\actions\CAction.php(75): index->run()
#8
- C:\xampp\htdocs\ls2\framework\web\CController.php(309): CAction->runWithParams(array("sid" => "722461", "newtest" => "Y", "lang" => "en"))
#9
- C:\xampp\htdocs\ls2\framework\web\CController.php(287): CController->runAction(index)
#10
- C:\xampp\htdocs\ls2\framework\web\CController.php(266): CController->runActionWithFilters(index, array())
#11
- C:\xampp\htdocs\ls2\framework\web\CWebApplication.php(276): CController->run("index")
#12
- C:\xampp\htdocs\ls2\framework\web\CWebApplication.php(135): CWebApplication->runController("survey/index/sid/722461/newtest/Y/lang/en")
#13
- C:\xampp\htdocs\ls2\framework\base\CApplication.php(162): CWebApplication->processRequest()
#14
- C:\xampp\htdocs\ls2\index.php(171): CApplication->run()
|
---|