View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
12675Bug reportsImport/Exportpublic2018-01-24 17:33
ReporterNickko Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionunable to reproduce 
Product Version2.67.x 
Summary12675: Error 1062 Duplicate entry when importing a question
Description

I export a question from a survey to importing it in another survey on the same server.
Error is : Erreur interne du serveur

CDbCommand n'a pas pu exécuter la commande SQL: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5853-0-en--0' for key 'PRIMARY'

Une erreur interne est apparue lorsque le serveur web traitait votre requete. Veuillez contacter the webmaster pour signaler ce problème.

Merci.

2017-09-15 10:26:27

Steps To Reproduce

I export a question from a survey to importing it in another survey on the same server.

Additional Information

At least, Limesurvey must send an error, not the server returning error 500

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)Version 2.67.3+170728
I will donate to the project if issue is resolvedNo
BrowserChrome, Safari, Edge
Database type & versionMySQL 263
Server OS (if known)OVH shared
Webserver software & version (if known)OVH shared
PHP Version7

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2018-01-24 17:01

administrator   ~46039

Which version was used to export this question?

Nickko

Nickko

2018-01-24 17:16

updater   ~46040

The same as for the import : Version 2.67.3+170728

c_schmitz

c_schmitz

2018-01-24 17:30

administrator   ~46041

The file looks manipulated to me. I just did a test export with 2.67.3 and the header looks like this:

<document>
<LimeSurveyDocType>Question</LimeSurveyDocType>
<DBVersion>263</DBVersion>
<languages>
<language>fr</language>
</languages>
<questions>
<fields>
<fieldname>qid</fieldname>
<fieldname>parent_qid</fieldname>
<fieldname>sid</fieldname>
<fieldname>gid</fieldname>
<fieldname>type</fieldname>
<fieldname>title</fieldname>
<fieldname>question</fieldname>
<fieldname>preg</fieldname>
<fieldname>help</fieldname>
<fieldname>other</fieldname>
<fieldname>mandatory</fieldname>
<fieldname>question_order</fieldname>
<fieldname>language</fieldname>
<fieldname>scale_id</fieldname>
<fieldname>same_default</fieldname>
<fieldname>relevance</fieldname>
<fieldname>modulename</fieldname>

You file looks like this

<?xml version="1.0" encoding="UTF-8"?>
<document>
<LimeSurveyDocType>Question</LimeSurveyDocType>
<DBVersion>263</DBVersion>
<languages>
<language>en</language>
<language>fr</language>
</languages>
<questions>
<fields>
<fieldname>type</fieldname>
<fieldname>title</fieldname>
<fieldname>question</fieldname>
<fieldname>preg</fieldname>
<fieldname>help</fieldname>
<fieldname>other</fieldname>
<fieldname>mandatory</fieldname>
<fieldname>question_order</fieldname>
<fieldname>language</fieldname>
<fieldname>scale_id</fieldname>
<fieldname>same_default</fieldname>
<fieldname>relevance</fieldname>
<fieldname>modulename</fieldname>

Note the missing SID field.

c_schmitz

c_schmitz

2018-01-24 17:33

administrator   ~46042

I am closing this issue because there is something wrong with the import file, not with the import

Issue History

Date Modified Username Field Change
2017-09-15 10:28 Nickko New Issue
2017-09-15 10:28 Nickko File Added: limesurvey_question_4863.lsq
2018-01-24 17:01 c_schmitz Assigned To => c_schmitz
2018-01-24 17:01 c_schmitz Status new => feedback
2018-01-24 17:01 c_schmitz Note Added: 46039
2018-01-24 17:16 Nickko Note Added: 46040
2018-01-24 17:16 Nickko Status feedback => assigned
2018-01-24 17:30 c_schmitz Note Added: 46041
2018-01-24 17:33 c_schmitz Status assigned => closed
2018-01-24 17:33 c_schmitz Resolution open => unable to reproduce
2018-01-24 17:33 c_schmitz Note Added: 46042