CDbException

CDbCommand n'a pas pu exécuter la commande SQL: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'ComfortUpdateChecker' for key 'dbindexmanage_plugins_name'. The SQL statement executed was: INSERT INTO `lime_plugins` (`name`, `plugin_type`, `active`, `version`, `load_error`, `load_error_message`) VALUES (:name, :plugin_type, :active, :version, :load_error, :load_error_message)

/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/db/CDbCommand.php(358)

346         {
347             if($this->_connection->enableProfiling)
348                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
349 
350             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
351             $message=$e->getMessage();
352             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
353                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
354 
355             if(YII_DEBUG)
356                 $message.='. The SQL statement executed was: '.$this->getText().$par;
357 
358             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
359                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
360         }
361     }
362 
363     /**
364      * Executes the SQL statement and returns query result.
365      * This method is for executing an SQL query that returns result set.
366      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
367      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
368      * them in this way can improve the performance. Note that if you pass parameters in this way,
369      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
370      * Please also note that all values are treated as strings in this case, if you need them to be handled as

Stack Trace

#1
+
 /media/shnoulle/data/webdev/master/application/helpers/update/updates/Update_430.php(9): CDbCommand->insert()
04 
05 class Update_430 extends DatabaseUpdateBase
06 {
07     public function up()
08     {
09             $this->db->createCommand()->insert(
10                 "{{plugins}}",
11                 [
12                     'name' => 'ComfortUpdateChecker',
13                     'plugin_type' => 'core',
14                     'active' => 1,
#2
+
 /media/shnoulle/data/webdev/master/application/helpers/update/DatabaseUpdateBase.php(47): LimeSurvey\Helpers\Update\Update_430->up()
42      */
43     public function safeUp()
44     {
45         $transaction = $this->db->beginTransaction();
46         try {
47             $this->up();
48             $this->updateVersion();
49             $transaction->commit();
50         } catch (Throwable $e) {
51             $transaction->rollback();
52             throw $e;
#3
+
 /media/shnoulle/data/webdev/master/application/helpers/update/updatedb_helper.php(88): LimeSurvey\Helpers\Update\DatabaseUpdateBase->safeUp()
83     try {
84         // Get all relevant files from updates/ folder
85         $updates = getRelevantUpdates($iOldDBVersion, Yii::app()->db, $options);
86         foreach ($updates as $update) {
87             // NB: safeUp() wraps up() inside a transaction and also updates DBVersion.
88             $update->safeUp();
89         }
90     } catch (Exception $e) {
91         Yii::app()->setConfig('Updating', false);
92         // Activate schema caching
93         $oDB->schemaCachingDuration = 3600;
2025-06-25 14:16:36 nginx/1.22.1 Yii Framework/1.1.30