CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '24-en' for key 'lime_idx1_group_ls'. The SQL statement executed was: INSERT INTO `lime_group_l10ns` (`gid`, `group_name`, `description`, `language`) VALUES (:yp0, :yp1, :yp2, :yp3)

/mnt/data/shnoulle/nginx/www/develop/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

#2
+
 /mnt/data/shnoulle/nginx/www/develop/application/helpers/admin/import_helper.php(1538): CActiveRecord->save()
1533                 $insertdata['gid'] = $aGIDReplacements[$oldgid];
1534             }
1535             $insertdata['gid'] = $aGIDReplacements[$oldgid];
1536             $oQuestionGroupL10n = new QuestionGroupL10n();
1537             $oQuestionGroupL10n->setAttributes($insertdata, false);
1538             if (!$oQuestionGroupL10n->save()) {
1539                 safeDie(gT("Error").": Failed to insert data [3] bla<br />");
1540             }
1541             if (!isset($aGIDReplacements[$oldgid])) {
1542                 $aGIDReplacements[$oldgid] = $newgid; // add old and new qid to the mapping array
1543                 $results['groups']++;
#3
+
 /mnt/data/shnoulle/nginx/www/develop/application/helpers/admin/import_helper.php(1188): XMLImportSurvey("/mnt/data/shnoulle/nginx/www/develop/tmp/ey4mie78zvxcjgmmgkn5sdf...", "<?xml version="1.0" encoding="UTF-8"?> <document> <LimeSurveyDo...", null, null, ...)
1183     } else {
1184         $sExtension = "";
1185     }
1186     switch ($sExtension) {
1187         case 'lss':
1188             $aImportResults = XMLImportSurvey($sFullFilePath, null, $sNewSurveyName, $DestSurveyID, $bTranslateLinksFields);
1189             if (!empty($aImportResults['newsid'])) {
1190                 TemplateConfiguration::checkAndcreateSurveyConfig($aImportResults['newsid']);
1191             }
1192             return $aImportResults;
1193         case 'txt':
#4
+
 /mnt/data/shnoulle/nginx/www/develop/application/controllers/admin/surveyadmin.php(1142): importSurveyFile("/mnt/data/shnoulle/nginx/www/develop/tmp/ey4mie78zvxcjgmmgkn5sdf...", true)
1137 
1138             // Now, we have the survey : start importing
1139             Yii::app()->loadHelper('admin/import');
1140 
1141             if ($action == 'importsurvey' && !$aData['bFailed']) {
1142                 $aImportResults = importSurveyFile($sFullFilepath, (Yii::app()->request->getPost('translinksfields') == '1'));
1143                 if (is_null($aImportResults)) {
1144                     $aImportResults = array(
1145                         'error'=>gT("Unknown error while reading the file, no survey created.")
1146                     );
1147                 }
2019-07-14 11:23:45 nginx/1.14.2 Yii Framework/1.1.21