CDbException

La table « {{permissions}} » associée à la classe Active record « Permission » est introuvable dans la base de données.

/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/framework/db/ar/CActiveRecord.php(2387)

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

Stack Trace

#2
+
 /home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/models/LSActiveRecord.php(29): CActiveRecord->hasAttribute("created")
24      * @return array
25      */
26     public function behaviors()
27     {
28         $aBehaviors=array();
29         $sCreateFieldName=($this->hasAttribute('created')?'created':null);
30         $sUpdateFieldName=($this->hasAttribute('modified')?'modified':null);
31         $sDriverName = Yii::app()->db->getDriverName();
32         if ($sDriverName=='sqlsrv' || $sDriverName=='dblib')
33         {
34             $sTimestampExpression=new CDbExpression('GETDATE()');
#4
+
 /home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/models/Permission.php(38): CActiveRecord::model("Permission")
33      * @param string $class
34      * @return Permission
35      */
36     public static function model($class = __CLASS__)
37     {
38         return parent::model($class);
39     }
40 
41     /**
42      * Returns the base permissions
43      *
#5
+
 /home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/models/Survey.php(281): Permission::model()
276     * @return CActiveRecord
277     */
278     public function permission($loginID)
279     {
280         $loginID = (int) $loginID;
281         if(Permission::model()->hasGlobalPermission('surveys','read',$loginID))// Test global before adding criteria
282             return $this;
283         $criteria = $this->getDBCriteria();
284         $criteria->mergeWith(array(
285             'condition' => 'sid IN (SELECT entity_id FROM {{permissions}} WHERE entity = :entity AND  uid = :uid AND permission = :permission AND read_p = 1)
286                             OR owner_id = :owner_id',
#6
+
 /home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/core/Survey_Common_Action.php(458): Survey->permission("1")
453             {
454                 Yii::app()->session['flashmessage'] = gT("Warning: You are still using the default password ('password'). Please change your password and re-login again.");
455             }
456 
457             // Count active survey
458             $aData['dataForConfigMenu']['activesurveyscount'] = $aData['activesurveyscount'] = Survey::model()->permission(Yii::app()->user->getId())->active()->count();
459 
460             // Count survey
461             $aData['dataForConfigMenu']['surveyscount'] = Survey::model()->count();
462 
463             // Count user
2016-05-02 11:23:02 Apache/2.2.22 (Debian) Yii Framework/1.1.17