View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
15291Bug reportsImport/Exportpublic2021-03-19 12:11
Reporterddiesenreither Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionno change required 
Summary15291: XMLImportSurvey function ignores subquestions
Description

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) {
continue;
}

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)) {
continue;
}

and it seems to work pretty fine.

TagsNo tags attached.
Attached Files
Bug heat8
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
Browser
Database type & versionMySQL 5.5.46
Server OS (if known)
Webserver software & version (if known)
PHP Version5.6.40

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

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).

ddiesenreither

ddiesenreither

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)
cdorin

cdorin

2020-12-23 17:51

reporter   ~61128

Does this issue still exist in latest release?

c_schmitz

c_schmitz

2021-03-19 12:11

administrator   ~63472

The problem is that the subquestions data in your database is already not correct.
Just run the integrity check in LimeSurvey once, and it will resolve the issue in the database silently.
After that you should be able to copy the survey without problems.

However, should you be able to reproduce the issue after following the steps above, please feel free to re-open the issue and give us exact details on how to reproduce it.

Thank you and best regards,

c_schmitz

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
2020-12-23 17:51 cdorin Status new => feedback
2020-12-23 17:51 cdorin Note Added: 61128
2021-03-19 11:20 c_schmitz Assigned To => c_schmitz
2021-03-19 11:20 c_schmitz Status feedback => assigned
2021-03-19 12:11 c_schmitz Status assigned => closed
2021-03-19 12:11 c_schmitz Resolution open => no change required
2021-03-19 12:11 c_schmitz Note Added: 63472