CDbException

La table « {{survey_653142}} » associée à la classe Active record « Response_653142 » est introuvable dans la base de données.

/home/www/demo.sondages.me/htdocs/framework/db/ar/CActiveRecord.php(2390)

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

Stack Trace

#0
+
 /home/www/demo.sondages.me/htdocs/framework/db/ar/CActiveRecord.php(413): CActiveRecordMetaData->__construct(Response_653142)
408     {
409         $className=get_class($this);
410         if(!array_key_exists($className,self::$_md))
411         {
412             self::$_md[$className]=null; // preventing recursive invokes of {@link getMetaData()} via {@link __get()}
413             self::$_md[$className]=new CActiveRecordMetaData($this);
414         }
415         return self::$_md[$className];
416     }
417 
418     /**
#1
+
 /home/www/demo.sondages.me/htdocs/framework/db/ar/CActiveRecord.php(682): CActiveRecord->getMetaData()
677      * @param string $name attribute name
678      * @return boolean whether this AR has the named attribute (table column).
679      */
680     public function hasAttribute($name)
681     {
682         return isset($this->getMetaData()->columns[$name]);
683     }
684 
685     /**
686      * Returns the named attribute value.
687      * If this is a new record and the attribute is not set before,
#2
+
 /home/www/demo.sondages.me/htdocs/application/models/LSActiveRecord.php(34): CActiveRecord->hasAttribute("created")
29      * @return array
30      */
31     public function behaviors()
32     {
33         $aBehaviors = array();
34         $sCreateFieldName = ($this->hasAttribute('created') ? 'created' : null);
35         $sUpdateFieldName = ($this->hasAttribute('modified') ? 'modified' : null);
36         $sDriverName = Yii::app()->db->getDriverName();
37         if ($sDriverName == 'sqlsrv' || $sDriverName == 'dblib') {
38             $sTimestampExpression = new CDbExpression('GETDATE()');
39         } else {
#4
+
 /home/www/demo.sondages.me/htdocs/application/models/Dynamic.php(38): CActiveRecord::model("Response_653142")
33             $className = get_called_class();
34         } elseif (is_numeric($className)) {
35             $className = get_called_class().'_'.$className;
36         }
37         /** @var self $model */
38         $model = parent::model($className);
39         return $model;
40     }
41 
42     /**
43      * @param string $scenario
#5
+
 /home/www/demo.sondages.me/htdocs/application/models/Response.php(25): Dynamic::model("Response_653142")
20          * @return Response
21          */
22         public static function model($className = null)
23         {
24             /** @var self $model */
25             $model = parent::model($className);
26             return $model;
27         }
28         /**
29          *
30          * @param int $surveyId
#6
+
 /home/www/demo.sondages.me/htdocs/application/libraries/MersenneTwister.php(16): Response::model("653142")
11  */
12 function setSeed($surveyid)
13 {
14     //traceVar(@$_SESSION['survey_' . $surveyid]['srid']);
15     if (isset($_SESSION['survey_'.$surveyid]['srid'])) {
16         $oResponse = \Response::model($surveyid)->findByPk($_SESSION['survey_'.$surveyid]['srid']);
17         $seed = $oResponse->seed;
18         /* fix empty seed, this allow broken seed (not number) */
19         if(empty($seed)) {
20             $seed = mt_rand();
21             $oResponse->seed = $seed;
2019-03-26 18:12:34 Apache/2.4.25 (Debian) Yii Framework/1.1.20
Journal d'application
Heure Niveau Categorie Message
18:12:34.660566 error system.db.CDbCommand
CDbCommand::fetchAll() failed: SQLSTATE[42S02]: Base table or view not
found: 1146 Table 'sm_demo.limeliste_survey_653142' doesn't exist. The SQL
statement executed was: SHOW FULL COLUMNS FROM `limeliste_survey_653142`.
18:12:34.660892 error exception.CDbException
CDbException: La table « {{survey_653142}} » associée à la classe
Active record « Response_653142 » est introuvable dans la base de
données. in
/home/www/demo.sondages.me/htdocs/framework/db/ar/CActiveRecord.php:2390
Stack trace:
#0
/home/www/demo.sondages.me/htdocs/framework/db/ar/CActiveRecord.php(413):
CActiveRecordMetaData->__construct(Object(Response_653142))
#1
/home/www/demo.sondages.me/htdocs/framework/db/ar/CActiveRecord.php(682):
CActiveRecord->getMetaData()
#2
/home/www/demo.sondages.me/htdocs/application/models/LSActiveRecord.php(34):
CActiveRecord->hasAttribute('created')
#3
/home/www/demo.sondages.me/htdocs/framework/db/ar/CActiveRecord.php(398):
LSActiveRecord->behaviors()
#4 /home/www/demo.sondages.me/htdocs/application/models/Dynamic.php(38):
CActiveRecord::model('Response_653142')
#5 /home/www/demo.sondages.me/htdocs/application/models/Response.php(25):
Dynamic::model('Response_653142')
#6
/home/www/demo.sondages.me/htdocs/application/libraries/MersenneTwister.php(16):
Response::model('653142')
#7
/home/www/demo.sondages.me/htdocs/application/helpers/frontend_helper.php(997):
ls\mersenne\setSeed('653142')
#8
/home/www/demo.sondages.me/htdocs/application/helpers/SurveyRuntimeHelper.php(663):
randomizationGroupsAndQuestions('653142')
#9
/home/www/demo.sondages.me/htdocs/application/helpers/SurveyRuntimeHelper.php(529):
SurveyRuntimeHelper->initFirstStep()
#10
/home/www/demo.sondages.me/htdocs/application/helpers/SurveyRuntimeHelper.php(104):
SurveyRuntimeHelper->initMove()
#11
/home/www/demo.sondages.me/htdocs/application/controllers/survey/index.php(590):
SurveyRuntimeHelper->run('653142', Array)
#12
/home/www/demo.sondages.me/htdocs/application/controllers/survey/index.php(24):
index->action()
#13
/home/www/demo.sondages.me/htdocs/framework/web/actions/CAction.php(76):
index->run()
#14 /home/www/demo.sondages.me/htdocs/framework/web/CController.php(308):
CAction->runWithParams(Array)
#15 /home/www/demo.sondages.me/htdocs/framework/web/CController.php(286):
CController->runAction(Object(index))
#16 /home/www/demo.sondages.me/htdocs/framework/web/CController.php(265):
CController->runActionWithFilters(Object(index), Array)
#17
/home/www/demo.sondages.me/htdocs/framework/web/CWebApplication.php(282):
CController->run('index')
#18
/home/www/demo.sondages.me/htdocs/framework/web/CWebApplication.php(141):
CWebApplication->runController('survey/index/ac...')
#19 /home/www/demo.sondages.me/htdocs/framework/base/CApplication.php(185):
CWebApplication->processRequest()
#20 /home/www/demo.sondages.me/htdocs/index.php(194): CApplication->run()
#21 {main}
REQUEST_URI=/survey/index/action/previewgroup/sid/653142/gid/75
HTTP_REFERER=https://demo.sondages.me/admin/questions/sa/view/surveyid/653142/gid/75/qid/363
---