View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
09729Bug reportsSurvey editingpublic2015-11-10 12:28
ReporterDenisChenu Assigned Tosammousa  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Summary09729: Integrity constraint violation: 1062 Duplicate entry '0-af'
Description

Sometimes, trying to update a survey:
Integrity constraint violation: 1062 Duplicate entry '0-af'

Steps To Reproduce

Not sure for survey ??? Always ?

TagsNo tags attached.
Attached Files
Internal Server Error.html (18,131 bytes)   
<!DOCTYPE html PUBLIC
	"-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Internal Server Error</title>

<style type="text/css">
/*<![CDATA[*/
body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;}
h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
h3 {font-family:"Verdana";font-weight:bold;font-size:11pt}
p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px}
.version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;}
/*]]>*/
</style>
</head>

<body>
<h1>Internal Server Error</h1>
<h2>CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &#039;0-af&#039; for key &#039;PRIMARY&#039;</h2>
<p>
An internal error occurred while the Web server was processing your request.
Please contact the webmaster to report this problem.
</p>
<p>
Thank you.
</p>
<div class="version">
2015-06-30 15:04:53 </div>
</body>
</html><!-- start log messages -->
<table class="yiiLog" width="100%" cellpadding="2" style="border-spacing:1px;font:11px Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;color:#666666;">
	<tr>
		<th style="background:black;color:white;" colspan="5">
			Application Log
		</th>
	</tr>
	<tr style="background-color: #ccc;">
	    <th style="width:120px">Timestamp</th>
		<th>Level</th>
		<th>Category</th>
		<th>Message</th>
	</tr>
	<tr style="background:#FFC0CB">
		<td align="center">15:04:53.173924</td>
		<td>error</td>
		<td>system.db.CDbCommand</td>
		<td><pre>CDbCommand::execute() failed: SQLSTATE[23000]: Integrity constraint
violation: 1062 Duplicate entry &#039;0-af&#039; for key &#039;PRIMARY&#039;. The SQL statement
executed was: INSERT INTO `lime_surveys_languagesettings`
(`surveyls_dateformat`, `surveyls_numberformat`, `surveyls_language`,
`surveyls_title`, `surveyls_description`, `surveyls_welcometext`,
`surveyls_endtext`, `surveyls_url`, `surveyls_urldescription`,
`surveyls_email_invite_subj`, `surveyls_email_invite`,
`surveyls_email_remind_subj`, `surveyls_email_remind`,
`surveyls_email_confirm_subj`, `surveyls_email_confirm`,
`surveyls_email_register_subj`, `surveyls_email_register`,
`email_admin_notification_subj`, `email_admin_notification`,
`email_admin_responses_subj`, `email_admin_responses`) VALUES (:yp0, :yp1,
:yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10, :yp11, :yp12, :yp13,
:yp14, :yp15, :yp16, :yp17, :yp18, :yp19, :yp20). Bound with :yp0=1,
:yp1=0, :yp2=&#039;af&#039;, :yp3=&#039;&#039;, :yp4=&#039;&#039;, :yp5=&#039;&#039;, :yp6=&#039;&#039;, :yp7=&#039;&#039;, :yp8=&#039;&#039;,
:yp9=&#039;&#039;, :yp10=&#039;&#039;, :yp11=&#039;&#039;, :yp12=&#039;&#039;, :yp13=&#039;&#039;, :yp14=&#039;&#039;, :yp15=&#039;&#039;,
:yp16=&#039;&#039;, :yp17=&#039;&#039;, :yp18=&#039;&#039;, :yp19=&#039;&#039;, :yp20=&#039;&#039;.</pre></td>
	</tr>	<tr style="background:#FFC0CB">
		<td align="center">15:04:53.175610</td>
		<td>error</td>
		<td>exception.CDbException</td>
		<td><pre>exception &#039;CDbException&#039; with message &#039;CDbCommand failed to execute the SQL
statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate
entry &#039;0-af&#039; for key &#039;PRIMARY&#039;&#039; in
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/db/CDbCommand.php:358
Stack trace:
#0
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(1080):
CDbCommand-&gt;execute()
#1
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(809):
CActiveRecord-&gt;insert(NULL)
#2 /var/www/my_webapp/lsdev/application/models/Survey.php(961):
CActiveRecord-&gt;save()
#3
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/base/CComponent.php(152):
Survey-&gt;setTranslatedFields(Array)
#4
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(161):
CComponent-&gt;__set(&#039;translatedField...&#039;, Array)
#5 /var/www/my_webapp/lsdev/application/models/Survey.php(895):
CActiveRecord-&gt;__set(&#039;translatedField...&#039;, Array)
#6
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/base/CModel.php(472):
Survey-&gt;__set(&#039;translatedField...&#039;, Array)
#7
/var/www/my_webapp/lsdev/application/controllers/SurveysController.php(62):
CModel-&gt;setAttributes(Array)
#8 [internal function]:
ls\controllers\SurveysController-&gt;actionUpdate(&#039;459733&#039;)
#9
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/actions/CAction.php(109):
ReflectionMethod-&gt;invokeArgs(Object(ls\controllers\SurveysController),
Array)
#10
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(47):
CAction-&gt;runWithParamsInternal(Object(ls\controllers\SurveysController),
Object(ReflectionMethod), Array)
#11
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/CController.php(308):
CInlineAction-&gt;runWithParams(Array)
#12
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(133):
CController-&gt;runAction(Object(CInlineAction))
#13
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/filters/CFilter.php(40):
CFilterChain-&gt;run()
#14
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/CController.php(1145):
CFilter-&gt;filter(Object(CFilterChain))
#15
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/filters/CInlineFilter.php(58):
CController-&gt;filterAccessControl(Object(CFilterChain))
#16
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(130):
CInlineFilter-&gt;filter(Object(CFilterChain))
#17
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/filters/CFilter.php(40):
CFilterChain-&gt;run()
#18
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/CController.php(1145):
CFilter-&gt;filter(Object(CFilterChain))
#19
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/filters/CInlineFilter.php(58):
CController-&gt;filterAccessControl(Object(CFilterChain))
#20
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(130):
CInlineFilter-&gt;filter(Object(CFilterChain))
#21
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/CController.php(291):
CFilterChain-&gt;run()
#22
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/CController.php(265):
CController-&gt;runActionWithFilters(Object(CInlineAction), Array)
#23
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/CWebApplication.php(282):
CController-&gt;run(&#039;update&#039;)
#24
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/web/CWebApplication.php(141):
CWebApplication-&gt;runController(&#039;surveys/update&#039;)
#25 /var/www/my_webapp/lsdev/application/core/WebApplication.php(76):
CWebApplication-&gt;processRequest()
#26
/var/www/my_webapp/lsdev/application/vendor/yiisoft/yii/framework/base/CApplication.php(184):
WebApplication-&gt;processRequest()
#27 /var/www/my_webapp/lsdev/application/entry.php(41): CApplication-&gt;run()
#28 /var/www/my_webapp/lsdev/index.php(2): include(&#039;/var/www/my_web...&#039;)
#29 {main}
REQUEST_URI=/lsdev/index.php?r=surveys/update&amp;id=459733
HTTP_REFERER=https://test.shnoulle.net/lsdev/index.php?r=surveys/update&amp;id=459733
---</pre></td>
	</tr></table>
<!-- end of log messages --><!-- start profiling summary -->
<table class="yiiLog" width="100%" cellpadding="2" style="border-spacing:1px;font:11px Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;color:#666666;">
	<tr>
		<th style="background:black;color:white;" colspan="6">
			Profiling Summary Report
			(Time: 1.18868s,
			Memory: 6,133KB)
		</th>
	</tr>
	<tr style="background-color: #ccc;">
	    <th>Procedure</th>
		<th>Count</th>
		<th>Total (s)</th>
		<th>Avg. (s)</th>
		<th>Min. (s)</th>
		<th>Max. (s)</th>
	</tr>
	<tr style="background:#FFFFFF">
		<td>system.db.CDbCommand.query(SELECT * FROM `lime_surveys` `t` WHERE `t`.`sid`=459733 LIMIT 1)</td>
		<td align="center">13</td>
		<td align="center">0.00677</td>
		<td align="center">0.00052</td>
		<td align="center">0.00048</td>
		<td align="center">0.00056</td>
	</tr>	<tr style="background:#F5F5F5">
		<td>system.db.CDbCommand.execute(INSERT INTO `lime_surveys_languagesettings` (`surveyls_dateformat`, `surveyls_numberformat`, `surveyls_language`, `surveyls_title`, `surveyls_description`, `surveyls_welcometext`, `surveyls_endtext`, `surveyls_url`, `surveyls_urldescription`, `surveyls_email_invite_subj`, `surveyls_email_invite`, `surveyls_email_remind_subj`, `surveyls_email_remind`, `surveyls_email_confirm_subj`, `surveyls_email_confirm`, `surveyls_email_register_subj`, `surveyls_email_register`, `email_admin_notification_subj`, `email_admin_notification`, `email_admin_responses_subj`, `email_admin_responses`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10, :yp11, :yp12, :yp13, :yp14, :yp15, :yp16, :yp17, :yp18, :yp19, :yp20). Bound with :yp0=1, :yp1=0, :yp2=&#039;af&#039;, :yp3=&#039;&#039;, :yp4=&#039;&#039;, :yp5=&#039;&#039;, :yp6=&#039;&#039;, :yp7=&#039;&#039;, :yp8=&#039;&#039;, :yp9=&#039;&#039;, :yp10=&#039;&#039;, :yp11=&#039;&#039;, :yp12=&#039;&#039;, :yp13=&#039;&#039;, :yp14=&#039;&#039;, :yp15=&#039;&#039;, :yp16=&#039;&#039;, :yp17=&#039;&#039;, :yp18=&#039;&#039;, :yp19=&#039;&#039;, :yp20=&#039;&#039;)</td>
		<td align="center">1</td>
		<td align="center">0.00123</td>
		<td align="center">0.00123</td>
		<td align="center">0.00123</td>
		<td align="center">0.00123</td>
	</tr>	<tr style="background:#FFFFFF">
		<td>system.db.CDbCommand.execute(UPDATE `lime_surveys_languagesettings` SET `surveyls_survey_id`=:yp0, `surveyls_language`=:yp1, `surveyls_title`=:yp2, `surveyls_description`=:yp3, `surveyls_welcometext`=:yp4, `surveyls_endtext`=:yp5, `surveyls_url`=:yp6, `surveyls_urldescription`=:yp7, `surveyls_email_invite_subj`=:yp8, `surveyls_email_invite`=:yp9, `surveyls_email_remind_subj`=:yp10, `surveyls_email_remind`=:yp11, `surveyls_email_register_subj`=:yp12, `surveyls_email_register`=:yp13, `surveyls_email_confirm_subj`=:yp14, `surveyls_email_confirm`=:yp15, `surveyls_dateformat`=:yp16, `surveyls_attributecaptions`=:yp17, `email_admin_notification_subj`=:yp18, `email_admin_notification`=:yp19, `email_admin_responses_subj`=:yp20, `email_admin_responses`=:yp21, `surveyls_numberformat`=:yp22, `attachments`=:yp23 WHERE `lime_surveys_languagesettings`.`surveyls_survey_id`=459733 AND `lime_surveys_languagesettings`.`surveyls_language`=&#039;en&#039;. Bound with :yp0=459733, :yp1=&#039;en&#039;, :yp2=&#039;Test&#039;, :yp3=&#039;&lt;p&gt;{BROKE}&lt;/p&gt;&#039;, :yp4=&#039;&lt;p&gt;{BROKE}&lt;/p&gt;&#039;, :yp5=&#039;&lt;p&gt;{BROKE}&lt;/p&gt;&#039;, :yp6=&#039;&#039;, :yp7=&#039;&#039;, :yp8=&#039;Invitation to participate in a survey&#039;, :yp9=&#039;Dear {FIRSTNAME},

you have been invited to participate in a survey.

The survey is titled:
&quot;{SURVEYNAME}&quot;

&quot;{SURVEYDESCRIPTION}&quot;

To participate, please click on the link below.

Sincerely,

{ADMINNAME} ({ADMINEMAIL})

----------------------------------------------
Click here to do the survey:
{SURVEYURL}

If you do not want to participate in this survey and don\&#039;t want to receive any more invitations please click the following link:
{OPTOUTURL}

If you are blacklisted but want to participate in this survey and want to receive invitations please click the following link:
{OPTINURL}&#039;, :yp10=&#039;Reminder to participate in a survey&#039;, :yp11=&#039;Dear {FIRSTNAME},

Recently we invited you to participate in a survey.

We note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part.

The survey is titled:
&quot;{SURVEYNAME}&quot;

&quot;{SURVEYDESCRIPTION}&quot;

To participate, please click on the link below.

Sincerely,

{ADMINNAME} ({ADMINEMAIL})

----------------------------------------------
Click here to do the survey:
{SURVEYURL}

If you do not want to participate in this survey and don\&#039;t want to receive any more invitations please click the following link:
{OPTOUTURL}&#039;, :yp12=&#039;Survey registration confirmation&#039;, :yp13=&#039;Dear {FIRSTNAME},

You, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}.

To complete this survey, click on the following URL:

{SURVEYURL}

If you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}.&#039;, :yp14=&#039;Confirmation of your participation in our survey&#039;, :yp15=&#039;Dear {FIRSTNAME},

this email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating.

If you have any further questions about this email, please contact {ADMINNAME} on {ADMINEMAIL}.

Sincerely,

{ADMINNAME}&#039;, :yp16=1, :yp17=NULL, :yp18=&#039;Response submission for survey {SURVEYNAME}&#039;, :yp19=&#039;Hello,

A new response was submitted for your survey \&#039;{SURVEYNAME}\&#039;.

Click the following link to reload the survey:
{RELOADURL}

Click the following link to see the individual response:
{VIEWRESPONSEURL}

Click the following link to edit the individual response:
{EDITRESPONSEURL}

View statistics by clicking here:
{STATISTICSURL}&#039;, :yp20=&#039;Response submission for survey {SURVEYNAME} with results&#039;, :yp21=&#039;Hello,

A new response was submitted for your survey \&#039;{SURVEYNAME}\&#039;.

Click the following link to reload the survey:
{RELOADURL}

Click the following link to see the individual response:
{VIEWRESPONSEURL}

Click the following link to edit the individual response:
{EDITRESPONSEURL}

View statistics by clicking here:
{STATISTICSURL}


The following answers were given by the participant:
{ANSWERTABLE}&#039;, :yp22=0, :yp23=NULL)</td>
		<td align="center">1</td>
		<td align="center">0.00119</td>
		<td align="center">0.00119</td>
		<td align="center">0.00119</td>
		<td align="center">0.00119</td>
	</tr>	<tr style="background:#F5F5F5">
		<td>system.db.CDbCommand.query(SELECT `languagesettings`.`surveyls_survey_id` AS `t1_c0`, `languagesettings`.`surveyls_language` AS `t1_c1`, `languagesettings`.`surveyls_title` AS `t1_c2`, `languagesettings`.`surveyls_description` AS `t1_c3`, `languagesettings`.`surveyls_welcometext` AS `t1_c4`, `languagesettings`.`surveyls_endtext` AS `t1_c5`, `languagesettings`.`surveyls_url` AS `t1_c6`, `languagesettings`.`surveyls_urldescription` AS `t1_c7`, `languagesettings`.`surveyls_email_invite_subj` AS `t1_c8`, `languagesettings`.`surveyls_email_invite` AS `t1_c9`, `languagesettings`.`surveyls_email_remind_subj` AS `t1_c10`, `languagesettings`.`surveyls_email_remind` AS `t1_c11`, `languagesettings`.`surveyls_email_register_subj` AS `t1_c12`, `languagesettings`.`surveyls_email_register` AS `t1_c13`, `languagesettings`.`surveyls_email_confirm_subj` AS `t1_c14`, `languagesettings`.`surveyls_email_confirm` AS `t1_c15`, `languagesettings`.`surveyls_dateformat` AS `t1_c16`, `languagesettings`.`surveyls_attributecaptions` AS `t1_c17`, `languagesettings`.`email_admin_notification_subj` AS `t1_c18`, `languagesettings`.`email_admin_notification` AS `t1_c19`, `languagesettings`.`email_admin_responses_subj` AS `t1_c20`, `languagesettings`.`email_admin_responses` AS `t1_c21`, `languagesettings`.`surveyls_numberformat` AS `t1_c22`, `languagesettings`.`attachments` AS `t1_c23` FROM `lime_surveys_languagesettings` `languagesettings`  WHERE (`languagesettings`.`surveyls_survey_id`=:ypl0). Bound with :ypl0=&#039;459733&#039;)</td>
		<td align="center">1</td>
		<td align="center">0.00047</td>
		<td align="center">0.00047</td>
		<td align="center">0.00047</td>
		<td align="center">0.00047</td>
	</tr>	<tr style="background:#FFFFFF">
		<td>system.db.CDbCommand.query(SELECT * FROM `lime_settings_global` `t` WHERE `t`.`stg_name`=&#039;authenticationPlugins&#039; LIMIT 1)</td>
		<td align="center">1</td>
		<td align="center">0.00038</td>
		<td align="center">0.00038</td>
		<td align="center">0.00038</td>
		<td align="center">0.00038</td>
	</tr>	<tr style="background:#F5F5F5">
		<td>system.db.CDbCommand.query(SELECT * FROM `lime_permissions` `t` WHERE `t`.`entity_id`=:yp0 AND `t`.`entity`=:yp1 AND `t`.`uid`=:yp2 AND `t`.`permission`=:yp3 LIMIT 1. Bound with :yp0=0, :yp1=&#039;global&#039;, :yp2=&#039;1&#039;, :yp3=&#039;superadmin&#039;)</td>
		<td align="center">1</td>
		<td align="center">0.00037</td>
		<td align="center">0.00037</td>
		<td align="center">0.00037</td>
		<td align="center">0.00037</td>
	</tr>	<tr style="background:#FFFFFF">
		<td>system.db.CDbCommand.query(SELECT * FROM `lime_settings_global` `t` WHERE `t`.`stg_name`=&#039;sitename&#039; LIMIT 1)</td>
		<td align="center">1</td>
		<td align="center">0.00034</td>
		<td align="center">0.00034</td>
		<td align="center">0.00034</td>
		<td align="center">0.00034</td>
	</tr>	<tr style="background:#F5F5F5">
		<td>system.db.CDbCommand.query(SELECT * FROM `lime_settings_global` `t` WHERE `t`.`stg_name`=&#039;force_ssl&#039; LIMIT 1)</td>
		<td align="center">1</td>
		<td align="center">0.00034</td>
		<td align="center">0.00034</td>
		<td align="center">0.00034</td>
		<td align="center">0.00034</td>
	</tr>	<tr style="background:#FFFFFF">
		<td>system.db.CDbCommand.query(SELECT * FROM `lime_settings_global` `t` WHERE `t`.`stg_name`=&#039;authorizationPlugin&#039; LIMIT 1)</td>
		<td align="center">1</td>
		<td align="center">0.00032</td>
		<td align="center">0.00032</td>
		<td align="center">0.00032</td>
		<td align="center">0.00032</td>
	</tr></table>
<!-- end of profiling summary -->
Internal Server Error.html (18,131 bytes)   
Bug heat2
Complete LimeSurvey version number (& build)9ff7fec
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionmysql 5
Server OS (if known)debian/linux
Webserver software & version (if known)nginx
PHP VersionPHP Version 5.6.9-0+deb8u1

Users monitoring this issue

There are no users monitoring this issue.

Activities

sammousa

sammousa

2015-10-05 15:50

reporter   ~33314

This had to do with translations, should be resolved now.

Issue History

Date Modified Username Field Change
2015-06-30 17:07 DenisChenu New Issue
2015-06-30 17:07 DenisChenu File Added: Internal Server Error.html
2015-10-05 15:50 sammousa Note Added: 33314
2015-10-05 15:50 sammousa Status new => resolved
2015-10-05 15:50 sammousa Resolution open => fixed
2015-10-05 15:50 sammousa Assigned To => sammousa
2015-11-10 12:28 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing