View Issue Details

IDProjectCategoryView StatusLast Update
14048Bug reports[All Projects] Expression Managerpublic2018-09-25 09:51
ReporterMaziAssigned ToDenisChenu 
PrioritynoneSeverityminor 
Status resolvedResolutionfixed 
Product Version3.14.x 
Target Version3.16.xFixed in Version3.14.x 
Summary14048: Valid Expression Manager placeholders are wrongly marked as invalid variables at survey logic file
Description

When using EM placeholders within JS that is used within the question source, these pleaseholders are marked red and lfagged as invalid vaiable:
{QID}
{SGQ}
...there may be some more.

The placeholders are replaced properly but even after refreshing the screen Limesurvey still marks them as error.

Steps To Reproduce

Place this sample JS code within the question text in source code mode. Then check the logic file:
<script>
$(document).ready(function(){

//adjust page layout
$("#question{QID} div.question-title-container").hide();
$("#question{QID} div.question-help-container").css("padding","0px");
$("#question{QID} div.answer-container").css("padding-top","0px");
$("#question{QID} div.answer-container").css("padding-bottom","0px");
$("#question{q20.qid}").css("margin-bottom","0px");
$("#question{q20.qid}").css("padding-bottom","0px");
});
</script>

TagsNo tags attached.
Complete LimeSurvey version number (& build)Version 3.14.8+180829
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionMySQL 5
Operating System (Server)Ubuntu 14 TLS
Webserver software & versionApache 2
PHP Version7.0.26

Relationships

has duplicate 14084 closed CheckLogic QID Javascript Error 

Activities

Mazi

Mazi

2018-09-11 16:06

developer  

QID.png (65,026 bytes)
QID.png (65,026 bytes)
DenisChenu

DenisChenu

2018-09-25 09:48

developer   ~49120

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

Related Changesets

LimeSurvey: master beedc97e

2018-09-25 09:48:25

DenisChenu

Details Diff
Fixed issue 14048: Valid Expression Manager placeholders are wrongly marked as invalid variables at survey logic file
Dev: replace it for survey logic, for question view : no SGQ replacement is done
Dev: better to use new function https://github.com/LimeSurvey/LimeSurvey/pull/1105/files#diff-796aba4d06254b9caea9d461e4ea80c9R8170
Dev: leave it for develop
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/views/admin/survey/Question/question_view.php Diff File

Issue History

Date Modified Username Field Change
2018-09-11 16:06 Mazi New Issue
2018-09-11 16:06 Mazi File Added: QID.png
2018-09-24 08:33 DenisChenu Relationship added has duplicate 14084
2018-09-24 08:33 DenisChenu Assigned To => DenisChenu
2018-09-24 08:33 DenisChenu Status new => assigned
2018-09-25 09:48 DenisChenu Changeset attached => LimeSurvey master beedc97e
2018-09-25 09:48 DenisChenu Note Added: 49120
2018-09-25 09:48 DenisChenu Resolution open => fixed
2018-09-25 09:51 DenisChenu Status assigned => resolved
2018-09-25 09:51 DenisChenu Fixed in Version => 3.14.x