View Issue Details

This issue affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
20836Bug reportsImport/Exportpublic2026-11-07 22:22
Reporterc_schmitz Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Product Version7.9.x 
Summary20836: Import of an LS3 survey (.lss): SGQA references to subquestions in question texts become undefined variables
Description

Importing the LimeSurvey 3 sample survey LS3_em_tailoring.lss (attached; it is the ExpressionScript sample from the manual) into 7.9.1 converts the old SGQA references in the question texts to the new Q<qid>_S<sqid> format. References to main questions are converted correctly, but references to subquestions/ranking items/dual-scale items point to subquestion IDs that don't exist, so the survey logic overview reports 'Undefined variable' and the question is flagged as containing errors.

In the source file (question 'variable naming' table):
{167418X18X902}, {INSERTANS:167418X18X902} (ranking item 2)
{167418X18X91srv}, {INSERTANS:167418X18X91srv} (array subquestion srv)
{167418X18X92smog#0}, {INSERTANS:...#0} (dual scale, scale 0)
{167418X18X92trans#1}, {INSERTANS:...#1} (dual scale, scale 1)

After import (survey 431258) they became e.g. {Q50645_S50666}, {Q50646_S50664}, {Q50647_S50661#0}, {Q50647_S50663#1}. The logic file shows Q50771_S50666, Q50772_S50664, Q50773_S50661, Q50773_S50663 as 'Undefined variable'. In two separate imports the Q part was renumbered but the _S part stayed the same (50666, 50664, 50661, 50663), i.e. the subquestion part of the reference is not mapped to the newly created subquestion IDs.

The references to main questions in the same table ({167418X18X88}, {167418X18X89}) convert fine.

(Separate, not a LimeSurvey bug: the file also contains weight*.453592, which LS7's tokenizer reads as a variable attribute; 0.453592 works.)

Steps To Reproduce
  1. Import the attached LS3_em_tailoring.lss (Create survey > Import).
  2. Open Tools > Survey logic file.
  3. The question with the variable naming table reports 'Undefined variable' for the four subquestion references listed above.
Additional Information

Likely area: application/helpers/admin/import_helper.php, the $aQuestionsMapping built for subquestions (around lines 2975-2990 / 3048) and its use when translating SGQA/INSERTANS references of legacy files without a question_l10ns section. Found while updating the manual's sample surveys.

TagsNo tags attached.
Attached Files
LS3_em_tailoring.zip (11,085 bytes)
Bug heat0
Complete LimeSurvey version number (& build)7.9.1
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionMySQL/MariaDB
Server OS (if known)Linux
Webserver software & version (if known)Apache
PHP Version8.3
Git branch / Pull Request URLN/A

Users monitoring this issue

There are no users monitoring this issue.

Activities

Issue History

Date Modified Username Field Change
2026-11-07 22:22 c_schmitz New Issue
2026-11-07 22:22 c_schmitz File Added: LS3_em_tailoring.zip