CDbException

Tabela "title" dla bieżącego rekordu klasy "Title" nie została znaleziona w bazie danych.

/var/www/clients/client12/web26/web/yii/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
+
 /var/www/clients/client12/web26/web/protected/models/Title.php(19): CActiveRecord::model("Title")
14      * Returns the static model of the specified AR class.
15      * @return CActiveRecord the static model class
16      */
17     public static function model($className=__CLASS__)
18     {
19         return parent::model($className);
20     }
21 
22     /**
23      * @return string the associated database table name
24      */
#2
+
 /var/www/clients/client12/web26/web/protected/components/Controller.php(39): Title::model()
34         yii::app()->request->cookies['currentTheme'] = $cookie;
35     }
36 
37     public function getCurrentTitle() {
38         if (yii::app()->request->cookies['currentTitleID'] == null || yii::app()->request->cookies['currentTheme'] == null) {
39             $title = Title::model()->findByAttributes(array("firm_id" => Yii::app()->params['firmID']));
40             if ($title == null) {
41                 throw new Exception("Kiosk nieaktywny. Brak tytułów");
42             }
43             $this->setCurrentTitle($title->id);
44         }
#3
+
 /var/www/clients/client12/web26/web/protected/components/Controller.php(12): Controller->getCurrentTitle()
07 
08     //@todo: dodać odpytaywanie o katalog
09     public function init() {
10         parent::init();
11 
12         $titleData = $this->getCurrentTitle();
13 
14         yii::app()->params['currentTitleID'] = $titleData["titleID"];
15         yii::app()->theme = $titleData["theme"];
16 
17         $this->getAutoIDs();
2024-03-19 05:21:14 Apache/2.2.16 (Debian) Yii Framework/1.1.13