CDbException

Таблица "menu_top", упомянутая в записи active record класса "Menu_top", не найдена в базе данных.

/home/svetnew/web/crystallux-svet.ru/public_html/framework/db/ar/CActiveRecord.php(2310)

2298     private $_model;
2299 
2300     /**
2301      * Constructor.
2302      * @param CActiveRecord $model the model instance
2303      */
2304     public function __construct($model)
2305     {
2306         $this->_model=$model;
2307 
2308         $tableName=$model->tableName();
2309         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2310             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2311                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2312         if($table->primaryKey===null)
2313         {
2314             $table->primaryKey=$model->primaryKey();
2315             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2316                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2317             elseif(is_array($table->primaryKey))
2318             {
2319                 foreach($table->primaryKey as $name)
2320                 {
2321                     if(isset($table->columns[$name]))
2322                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#1
+
 /home/svetnew/web/crystallux-svet.ru/public_html/protected/models/Menu_top.php(5): CActiveRecord::model("Menu_top")
01 <?php
02 class Menu_top extends CActiveRecord
03 {
04     public static function model($className = __CLASS__) {
05         return parent::model($className);
06     }
07 
08     public function tableName() {
09         return 'menu_top';
10     }
#2
+
 /home/svetnew/web/crystallux-svet.ru/public_html/protected/extensions/Headerwidget.php(9): Menu_top::model()
04     private $topmenu;
05     private $basket;
06     private $url;
07     public function init()
08     {
09         $this->topmenu = Menu_top::model()->findAll(array('condition'=>'`id_parent`=0','order'=>'`position` ASC'));
10 
11         if(isset(Yii::app()->request->cookies['yii_cart']->value))
12         {
13             $this->basket = Basket::model()->findByAttributes(array('id_session'=>Yii::app()->request->cookies['yii_cart']->value));
14             if(!isset($this->basket->id))
#5
+
 /home/svetnew/web/crystallux-svet.ru/public_html/protected/views/layouts/main.php(5): CBaseController->widget("ext.Headerwidget", array("info" => Info))
01 <? include_once 'head.php'; ?>
02 <body>
03 
04 <div class="site-wrap">
05     <?php $this->widget('ext.Headerwidget',array('info'=>$this->info));?>
06     <main>
07         <?php echo $content;?>
08         <?php if($this->info['question_show'] == 1){$this->widget('ext.Bottomfeedback',array('info'=>$this->info));}?>
09     </main>
10     <?php $this->widget('ext.Footerwidget',array('info'=>$this->info));?>
2024-03-19 05:07:09 Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g Yii Framework/1.1.13