CDbException

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

/var/www/hosts/framework/db/ar/CActiveRecord.php(2364)

2352 
2353     /**
2354      * Constructor.
2355      * @param CActiveRecord $model the model instance
2356      * @throws CDbException if specified table for active record class cannot be found in the database
2357      */
2358     public function __construct($model)
2359     {
2360         $this->_modelClassName=get_class($model);
2361 
2362         $tableName=$model->tableName();
2363         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2364             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2365                 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName)));
2366         if($table->primaryKey===null)
2367         {
2368             $table->primaryKey=$model->primaryKey();
2369             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2370                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2371             elseif(is_array($table->primaryKey))
2372             {
2373                 foreach($table->primaryKey as $name)
2374                 {
2375                     if(isset($table->columns[$name]))
2376                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#3
+
 /var/www/hosts/lk.usoft.ru/protected/modules/navigator/NavigatorModule.php(159): CActiveRecord->findByPk()
154         if (!$id) {
155             throw new CHttpException(404, 'Страница не найдена.');
156         }
157 
158         if (!isset($this->pages[$id])) {
159             $model = Pages::model()->findByPk($id);
160 
161             if ($model === null) {
162                 throw new CHttpException(404, 'Страница не найдена.');
163             }
164             Yii::import('tags.models.ContentView');
#4
+
 /var/www/hosts/lk.usoft.ru/protected/fcomponents/Controller.php(246): NavigatorModule->page()
241 
242 //                if ($user->info['type'] == 'user_friend' && !in_array('tests', $REQ)) {
243 //                    header("Location: " . SystemRegistry::getInstance()->config['host'] . "tests");
244 //                }
245 
246                 $page = Yii::app()->getModule('navigator')->page();
247                 //check access
248                 // `page_access` не использовалось в старой системе. его можно использовать для хранения новых типов доступов
249 
250                 //-----------болшой и страшной костыл----------------
251                 if(!Yii::app()->user->isGuest && UserAccessRule::isBanned() && $page['page_url'] != 'logout') $this->redirect('/logout');
#11
+
 /var/www/hosts/lk.usoft.ru/index.php(68): CApplication->run()
63 //Yii::setPathOfAlias('templates', $dirname_file .DIRECTORY_SEPARATOR.'templates');
64 Yii::setPathOfAlias('core', INDEX_DIR . DIRECTORY_SEPARATOR . 'core');
65 require_once(__DIR__ . DIRECTORY_SEPARATOR . 'protected' . DIRECTORY_SEPARATOR . 'vendors' . DIRECTORY_SEPARATOR . 'Loader.php');
66 Yii::registerAutoloader(array('Loader', 'systemMainAutoload'));
67 
68 Yii::createWebApplication($config_yii_path)->run();
2026-08-10 12:34:29 nginx/1.18.0 Yii Framework/1.1.15