CDbException

CDbException

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

/mnttu/webfs2/base/w/www/webapps/resources/packages/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(2312)

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

Stack Trace

#1
+
 /mnttu/webfs2/base/w/www/webapps/staff-profiles/protected/models/StaffProfile.php(56): CActiveRecord::model("StaffProfile")
51      * @param string $className active record class name.
52      * @return StaffProfileWeb the static model class
53      */
54     public static function model($className=__CLASS__)
55     {
56         return parent::model($className);
57     }
58 
59     /**
60      * @return string the associated database table name
61      */
#2
+
 /mnttu/webfs2/base/w/www/webapps/staff-profiles/protected/controllers/ListingController.php(601): StaffProfile::model()
596         if($this->wrapper===true)
597         {    echo $this->beforeNeedle;
598         }
599         if(!file_exists($this->cache_path.$cache_name))
600         {
601             $staffprofile = StaffProfile::model();
602             $staffprofile->getSingle($this_id);
603             $staffprofile->render();                
604             $html=Yii :: app()->mustache->parse( 'profile', $staffprofile->renderer );    
605             try {
606                 $html.=file_get_contents("https://www.aber.ac.uk/pure_pubs/index.php?email=".$id."@aber.ac.uk&lng=".Yii::app()->language);
#17
+
 /mnttu/webfs2/base/w/www/webapps/staff-profiles/index.php(35): CApplication->run()
30 defined('YII_DEBUG') or define('YII_DEBUG',true);
31 // specify how many levels of call stack should be shown in each log message
32 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
33 
34 require_once($yii);
35 Yii::createWebApplication($config)->run();
36 
37 ?>
2017-02-26 14:35:16 Apache Yii Framework/1.1.12