Description | When:
- enabling admin notifications
- and an error happens when sending notification,
- a record is attempted to be saved to lime_failed_emails
Fails with this error:
CDbException
CDbCommand failed to execute the SQL statement: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF2\x00H[\x185...' for column `sample_ls5`.`lime_failed_emails`.`error_message` at row 1. The SQL statement executed was: INSERT INTO `lime_failed_emails` (`language`, `status`, `recipient`, `surveyid`, `responseid`, `email_type`, `error_message`, `created`, `updated`, `resend_vars`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, NOW(), :yp7, :yp8)
/home/sample/public_html/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
#0
+ /home/sample/public_html/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(1083): CDbCommand->execute()
#1
+ /home/sample/public_html/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(811): CActiveRecord->insert(null)
#2
– /home/sample/public_html/application/helpers/frontend_helper.php(699): CActiveRecord->save(false)
694 $failedEmailModel->created = date('Y-m-d H:i:s');
695 $failedEmailModel->status = 'SEND FAILED';
696 $failedEmailModel->updated = date('Y-m-d H:i:s');
697 $failedEmailModel->resend_vars = $resendVars;
698
699 return $failedEmailModel->save(false);
700 }
701
702 function failedEmailSuccess($id)
703 {
704 $model = new FailedEmail();
#3
– /home/sample/public_html/application/helpers/frontend_helper.php(550): saveFailedEmail(null, "sophie@logicaloutcomes.net", 616768, 1001, ...)
545 $mailer->setTo($notificationRecipient);
546 $mailerSuccess = $mailer->SendMessage();
547 }
548 if (!$mailerSuccess) {
549 $failedEmailCount++;
550 saveFailedEmail($failedNotificationId, $notificationRecipient, $surveyid, $responseId, 'admin_notification', $emailLanguage, $mailer);
551 if (empty($emails) && $debug > 0 && Permission::model()->hasSurveyPermission($surveyid, 'surveysettings', 'update')) {
552 /* Find a better way to show email error … */
553 echo CHtml::tag(
554 "div",
555 ['class' => 'alert alert-danger'],
#4
– /home/sample/public_html/application/helpers/SurveyRuntimeHelper.php(1271): sendSubmitNotifications(616768)
1266 if ($surveyActive && $oSurvey->getHasTokensTable()) {
1267 submittokens();
1268 }
1269 //Send notifications
1270 if ($surveyActive) {
1271 sendSubmitNotifications($this->iSurveyid);
1272 }
1273 // Link to Print Answer Preview **********
1274 $this->aSurveyInfo['aCompleted']['aPrintAnswers']['show'] = false;
1275 if ($this->aSurveyInfo['printanswers'] == 'Y') {
1276 $this->aSurveyInfo['aCompleted']['aPrintAnswers']['show'] = true;
#5
+ /home/sample/public_html/application/helpers/SurveyRuntimeHelper.php(219): SurveyRuntimeHelper->moveSubmitIfNeeded()
#6
+ /home/sample/public_html/application/controllers/survey/SurveyIndex.php(643): SurveyRuntimeHelper->run(616768, array("surveyid" => 616768, "thissurvey" => array("sid" => 616768, "owner_id" => 5, "gsid" => 1, "admin" => "Administrator", ...), "thisstep" => 6, "tokensexist" => 0, ...))
#7
+ /home/sample/public_html/application/controllers/survey/SurveyIndex.php(22): SurveyIndex->action()
#8
+ /home/sample/public_html/vendor/yiisoft/yii/framework/web/actions/CAction.php(76): SurveyIndex->run()
#9
+ /home/sample/public_html/vendor/yiisoft/yii/framework/web/CController.php(308): CAction->runWithParams(array("sid" => "616768"))
#10
+ /home/sample/public_html/vendor/yiisoft/yii/framework/web/CController.php(286): CController->runAction(SurveyIndex)
#11
+ /home/sample/public_html/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters(SurveyIndex, array())
#12
+ /home/sample/public_html/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): CController->run("index")
#13
+ /home/sample/public_html/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("survey/index/sid/616768")
#14
+ /home/sample/public_html/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#15
+ /home/sample/public_html/index.php(161): CApplication->run()
|
---|