CDbException

The table "TemplateConfig" for active record class "TemplateConfig" cannot be found in the database.

/data/webdev/master/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(2391)

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

Stack Trace

#2
+
 /data/webdev/master/application/models/TemplateConfig.php(179): CActiveRecord->__construct()
174         ) {
175             $oMotherTemplate = $oRTemplate->oMotherTemplate;
176             if (!($oMotherTemplate instanceof TemplateConfiguration)) {
177                 if (!$force && App()->twigRenderer->getPathOfFile($sFile)) {
178                     // return dummy template , new self broke (No DB : TODO : must fix init of self)
179                     $templateConfig = new TemplateConfig();
180                     $templateConfig->sTemplateName = null;
181                     return $templateConfig;
182                 }
183                 /* @todo : same for css and js (in registered package ? ) */
184                 TemplateConfiguration::uninstall($this->sTemplateName);
#3
+
 /data/webdev/master/application/views/admin/themes/templatesummary_view.php(36): TemplateConfig->getTemplateForFile()
31                             <a href="<?php echo $this->createUrl('admin/themes', array('sa'=>'view','screenname'=>$screenname,'templatename'=>$templatename, 'editfile' => $file )); ?>" class="<?php if($file == $relativePathEditfile ){echo 'text-danger';}else{echo 'text-success';}; ?>">
32                                 <?php echo (empty(substr(strrchr($file, DIRECTORY_SEPARATOR), 1)))?$file:substr(strrchr($file, DIRECTORY_SEPARATOR), 1) ;?>
33                             </a>
34                         </div>
35                         <div class="col-sm-3">
36                             <?php if ( $oEditedTemplate->getTemplateForFile($file, $oEditedTemplate,false) && $oEditedTemplate->getTemplateForFile($file, $oEditedTemplate)->sTemplateName == $oEditedTemplate->sTemplateName) { ?>
37                                 <?php if (Permission::model()->hasGlobalPermission('templates','delete')) { ?>
38                                     <?=CHtml::form(array('admin/themes','sa'=>'templatefiledelete'), 'post'); ?>
39                                         <input type='hidden' name="filetype" value="<?php echo CHtml::encode('screen'); ?>" />
40                                         <input type='hidden' name="filename" value="<?php echo CHtml::encode($file); ?>" />
41                                         <input type='submit' class='btn btn-default btn-xs template-files-delete-button' value='<?php eT("Reset"); ?>' onclick="javascript:return confirm('<?php eT(" Are you sure you want to reset this file? ", "js"); ?>')"/>
#7
+
 /data/webdev/master/application/controllers/AdminController.php(261): CController->renderPartial()
256                     $view = $sModulePath;
257                 }
258             }
259         }
260 
261         return parent::renderPartial($view, $data, $return, $processOutput);
262     }
263 
264     /**
265      * Routes all the actions to their respective places
266      *
2023-01-10 18:59:01 nginx/1.18.0 Yii Framework/1.1.26