View Issue Details

IDProjectCategoryView StatusLast Update
15291Bug reportsImport/Exportpublic2019-09-18 08:35
Reporterddiesenreither Assigned To 
Status newResolutionopen 
Summary15291: XMLImportSurvey function ignores subquestions

I have a survey with Questiongroups -> Questions and corresponding Subquestions. If i try to clone this survey, some of the subquestions get not imported. I checked the export file and the import function and found that the subquestions of the question have gid = 0. The parent_qid is correct, the parent question has the correct gid of the group. In the XMLImportSurvey - Function you check:

if (!in_array($insertdata['language'], $aLanguagesSupported) || $insertdata['gid'] == 0) {

which is right for the questions but not for the subquestions because they have gid = 0.

I have changed it to:

if (!in_array($insertdata['language'], $aLanguagesSupported)) {

and it seems to work pretty fine.

TagsNo tags attached.
Complete LimeSurvey version number (& build)Version 3.5.3+180316 all up to latest v3
I will donate to the project if issue is resolvedNo
Database & DB-VersionMySQL 5.5.46
Server OS (if known)
Webserver software & version (if known)
PHP Version5.6.40




2019-09-18 08:06

developer   ~53611

Can you send the broken lss ?

Else : in my opinion : for subquestion , must check if question exist :) (are already imported).



2019-09-18 08:35

reporter   ~53613

Here you go. The group id is 31. This group contains a single questions with three subquestions each. The subquestions do not get imported.

limesurvey_survey_854863.lss (1,064,822 bytes)

Issue History

Date Modified Username Field Change
2019-09-17 09:20 ddiesenreither New Issue
2019-09-18 08:06 DenisChenu Note Added: 53611
2019-09-18 08:35 ddiesenreither File Added: limesurvey_survey_854863.lss
2019-09-18 08:35 ddiesenreither Note Added: 53613