View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
08510Bug reportsImport/Exportpublic2014-02-04 13:32
Reportersth Assigned Toc_schmitz  
PriorityhighSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary08510: Survey Import / Survey Copy not working
Description

When importing an .lss file, after clicking "import", the following error-message appears:

Fehler beim Speiern:Array ( [qid] => Array ( [0] => Qid "2602" is already in use. ) )

Same thing happens when copying an existing survey and clicking on "copy".

Steps To Reproduce

Go to "Import", choose an .lss survey file, click on the "import" button.

Go to "copy", choose an existing survey and click on the "copy" button.

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)131219
I will donate to the project if issue is resolvedNo
BrowserChrome (Mac)
Database type & versionMysql 5
Server OS (if known)Apache 2
Webserver software & version (if known)Apache 2
PHP Version5.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2014-01-06 13:57

updater   ~27722

I can reproduce this issue using the same build. A test survey is attached.

c_schmitz

c_schmitz

2014-01-08 17:40

administrator   ~27776

Mazi, I cannot reproduce this at all, neither with that specific release version nor with the latest Git version. Can you describe the exact steps to reproduce?

Mazi

Mazi

2014-01-08 17:55

updater   ~27778

Carsten, I have created an account for you on my test server, you should have received an email at carsten.schmitz@limesurvey.org.

When I try to import the attached survey at that system I get:
"Error: Failed to insert data[6]"

When I try to copy the "MASTER Template Test..." survey I get:
Error while saving: Array ( [qid] => Array ( [0] => Qid "2999" is already in use. ) )

Mazi

Mazi

2014-01-08 17:57

updater   ~27779

At that system I manually updated from 2.05 RC5 to the stable version mentioned by copying all files and then overwriting /upload/* with the folder from the old RC 5 system.
Could that have caused the problem? Maybe I should have copied /upload/templates and /upload/surveys only?!

c_schmitz

c_schmitz

2014-01-10 10:04

administrator   ~27814

sth, what's your exact PHP version?

Mazi

Mazi

2014-01-10 10:16

updater   ~27815

5.3.2 (sth is using on my server).

c_schmitz

c_schmitz

2014-01-14 00:44

administrator   ~27840

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13678

c_schmitz

c_schmitz

2014-01-14 00:45

administrator   ~27841

This seems to be a PHP bug as I could find no logical reason that it crashes out with duplicate database entries. For some reason the foreach loop gets messed up and the pointer is reset in the midst of the foreach - caused by the database insert. Makes no sense at all and does not happen on newer PHP versions.

c_schmitz

c_schmitz

2014-01-16 16:45

administrator   ~27915

2.05+ Build 140116 released

Mazi

Mazi

2014-01-29 15:17

updater   ~28262

Error still exist when trying to copy a survey:
"Error while saving: Array ( [qid] => Array ( [0] => Qid "7709" is already in use. ) )"

I just updated to the latest 2.05 version, build 140125

c_schmitz

c_schmitz

2014-02-02 15:38

administrator   ~28396

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13816

c_schmitz

c_schmitz

2014-02-04 13:32

administrator   ~28512

Version 2.05+ Build 140204 released

Related Changesets

LimeSurvey: master 0f31ce4f

2014-01-13 23:43:46

c_schmitz

Details Diff
Fixed issue 08510: Survey import/copy not working
Dev This seems to be a PHP bug as I could find no logical reason that it crashes out with duplicate database entries. For some reason the foreach loop gets messed up and the pointer is reset in the midst of the foreach - caused by the database insert. Makes no sense at all and does not happen on newer PHP versions.
Affected Issues
08510
mod - application/helpers/admin/import_helper.php Diff File

LimeSurvey: master 22771e6b

2014-02-02 14:37:56

c_schmitz

Details Diff
Fixed issue 08510: Survey import/copy not working
Dev This seems to be a PHP bug as I could find no logical reason that it crashes out with duplicate database entries. For some reason the foreach loop gets messed up and the pointer is reset in the midst of the foreach - caused by the database insert. Makes no sense at all and does not seem to happen on newer/older PHP versions.
Affected Issues
08510
mod - application/helpers/admin/import_helper.php Diff File

Issue History

Date Modified Username Field Change
2014-01-06 13:07 sth New Issue
2014-01-06 13:56 Mazi File Added: Master_DemoSurveyShop.lss
2014-01-06 13:57 Mazi Assigned To => c_schmitz
2014-01-06 13:57 Mazi Status new => assigned
2014-01-06 13:57 Mazi Note Added: 27722
2014-01-08 17:40 c_schmitz Note Added: 27776
2014-01-08 17:40 c_schmitz Status assigned => feedback
2014-01-08 17:55 Mazi Note Added: 27778
2014-01-08 17:55 Mazi Status feedback => assigned
2014-01-08 17:57 Mazi Note Added: 27779
2014-01-10 10:04 c_schmitz Note Added: 27814
2014-01-10 10:11 c_schmitz Status assigned => feedback
2014-01-10 10:16 Mazi Note Added: 27815
2014-01-14 00:44 c_schmitz Changeset attached => LimeSurvey master 0f31ce4f
2014-01-14 00:44 c_schmitz Note Added: 27840
2014-01-14 00:44 c_schmitz Resolution open => fixed
2014-01-14 00:45 c_schmitz Note Added: 27841
2014-01-14 00:45 c_schmitz Status feedback => resolved
2014-01-14 00:45 c_schmitz Fixed in Version => 2.05+
2014-01-16 16:45 c_schmitz Note Added: 27915
2014-01-16 16:45 c_schmitz Status resolved => closed
2014-01-29 15:17 Mazi Note Added: 28262
2014-01-29 15:17 Mazi Status closed => feedback
2014-01-29 15:17 Mazi Resolution fixed => reopened
2014-01-29 15:17 Mazi Status feedback => assigned
2014-02-02 15:38 c_schmitz Changeset attached => LimeSurvey master 22771e6b
2014-02-02 15:38 c_schmitz Note Added: 28396
2014-02-02 15:38 c_schmitz Status assigned => resolved
2014-02-02 15:38 c_schmitz Resolution reopened => fixed
2014-02-04 13:32 c_schmitz Note Added: 28512
2014-02-04 13:32 c_schmitz Status resolved => closed