Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
08315Bug reportsExpression Managerpublic2013-12-19 09:43
Reportermsr_lance Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary08315: Group hidden when Multiple Choice has placeholder question text and a dependent question.
Description

The combination of a Multiple Choice question using placeholder (lime replacement) in the question text and having a question dependent on the MC's SQ results in the page being hidden.

Steps To Reproduce

Set survey to All-in-one.

  1. Add Q1 - Short Text.
  2. Add Q2 - Multiple Choice. Use placeholder in Question Text {Q1.shown}. Add SQ001.
  3. Add Q3 - Short Text. Make dependent on Q2's SQ001.

group-1 will be hidden

Additional Information

The code that hides group-1 occurs when relevance1609 != '1'… and relevance1609 is only set to 1 if 948483X147X1597SQ001 is selected. 948483X147X1597SQ001 is the option for the multiple choice itself.

if (($('#relevance1609').val()=='1')) {
$('#group-1').show();
if ($('#relevanceG1').val()=='0') { relChangeG1=true; }
$('#relevanceG1').val(1);
}
else {
$('#group-1').hide();
if ($('#relevanceG1').val()=='1') { relChangeG1=true; }
$('#relevanceG1').val(0);
}

if ((((LEMval('948483X147X1597SQ001.NAOK') == "Y"))))
{
$('#question1609').show();
relChange1609=true;
$('#relevance1609').val('1');
}
else {
$('#question1609').hide();
if ($('#relevance1609').val()=='1') { relChange1609=true; }
$('#relevance1609').val('0');
}

TagsNo tags attached.
Attached Files
before.lss (16,503 bytes)
placeholder_1.png (10,388 bytes)   
placeholder_1.png (10,388 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)131022
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL 5.6.12
Server OS (if known)Ubuntu 12.04.3
Webserver software & version (if known)nginx 1.1.19
PHP VersionPHP 5.3.10

Relationships

related to 08438 closedDenisChenu Hidden Fields Not recording default data 

Activities

Mazi

Mazi

2013-10-25 20:58

updater   ~26995

I can confirm that it is the combination of a placeholder at the MC question AND the condition at the following question which causes the problem.
It all works fine, if:

  1. No condition is set to the following text question
    OR
  2. No placeholder is used at the MC question.

The combination of both causes problems though.

tpartner

tpartner

2013-11-01 20:32

partner   ~27070

Last edited: 2013-11-01 20:34

For some reason the group is only being flagged as "always relevant" if there is NO tailoring in it.

See the following condition in line 6204 of em_manager_helper.php:
count($tailorParts) == 0

Thomas, thoughts as to why that condition would have been inserted?

DenisChenu

DenisChenu

2013-11-04 22:33

developer   ~27085

Hi,

I upload before.lss and don't find the relevance and the placeholder,
Then i trye to do it myself and don't see the issue with last GIT version.?

WHat is my error in example lss file ?

tpartner

tpartner

2013-11-04 22:45

partner   ~27086

Denis, add a {q1} placeholder to the text of "q2b" and retest (see my screenshot - placeholder_1.png)

DenisChenu

DenisChenu

2013-11-08 09:01

developer   ~27147

Really strange issue

tpartner

tpartner

2013-11-08 12:25

partner   ~27158

Yeah, but easily fixed by removing "count($tailorParts) == 0". I'm just not sure why that was put in so am reluctant to remove it.

DenisChenu

DenisChenu

2013-11-08 13:27

developer   ~27159

Thanks for the tips Tony :)

DenisChenu

DenisChenu

2013-11-14 11:20

developer   ~27191

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

DenisChenu

DenisChenu

2013-11-14 11:21

developer   ~27192

Fixed in 2.0, hard to realy fix, maybe don't test all combination ...

DenisChenu

DenisChenu

2013-11-15 18:46

developer   ~27199

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

c_schmitz

c_schmitz

2013-11-24 19:05

administrator   ~27351

2.00+ Build 131122 released

Related Changesets

LimeSurvey: master 8111964a

2013-11-14 10:20:10

DenisChenu

Details Diff
Fixed issue 08315: Group hidden when Multiple Choice has placeholder question text and a dependent question.
Dev: this fix other issue with Equation question type
Dev: This fix other issue with hidden attribute
Affected Issues
08315
mod - application/helpers/expressions/em_core_helper.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - scripts/expressions/em_javascript.js Diff File

LimeSurvey: 2.05 17024296

2013-11-15 17:46:01

DenisChenu

Details Diff
Fixed issue 08315: Group hidden when Multiple Choice has placeholder question text and a dependent question.
Dev: this fix other issue with Equation question type
Dev: This fix other issue with hidden attribute
Dev : cherry pick of 8111964aee28f4da4335088e72c4817ee54b266d
Affected Issues
08315
mod - application/helpers/expressions/em_core_helper.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - scripts/expressions/em_javascript.js Diff File

Issue History

Date Modified Username Field Change
2013-10-25 18:34 msr_lance New Issue
2013-10-25 18:34 msr_lance File Added: before.lss
2013-10-25 20:56 Mazi Assigned To => c_schmitz
2013-10-25 20:56 Mazi Status new => assigned
2013-10-25 20:58 Mazi Note Added: 26995
2013-10-26 21:36 c_schmitz Assigned To c_schmitz =>
2013-10-26 21:36 c_schmitz Status assigned => new
2013-11-01 20:32 tpartner Note Added: 27070
2013-11-01 20:34 tpartner Note Edited: 27070
2013-11-01 20:35 tpartner Assigned To => TMSWhite
2013-11-01 20:35 tpartner Status new => assigned
2013-11-04 22:33 DenisChenu Note Added: 27085
2013-11-04 22:34 DenisChenu File Added: limesurvey_survey_bug 08315.lss
2013-11-04 22:45 tpartner File Added: placeholder_1.png
2013-11-04 22:45 tpartner Note Added: 27086
2013-11-07 15:04 c_schmitz Assigned To TMSWhite => DenisChenu
2013-11-08 09:01 DenisChenu Note Added: 27147
2013-11-08 12:25 tpartner Note Added: 27158
2013-11-08 13:27 DenisChenu Note Added: 27159
2013-11-14 11:20 DenisChenu Changeset attached => LimeSurvey master 8111964a
2013-11-14 11:20 DenisChenu Note Added: 27191
2013-11-14 11:20 DenisChenu Resolution open => fixed
2013-11-14 11:21 DenisChenu Note Added: 27192
2013-11-15 18:46 DenisChenu Changeset attached => LimeSurvey 2.05 17024296
2013-11-15 18:46 DenisChenu Note Added: 27199
2013-11-15 18:46 DenisChenu Status assigned => resolved
2013-11-15 18:46 DenisChenu Fixed in Version => 2.00+
2013-11-24 19:05 c_schmitz Note Added: 27351
2013-11-24 19:05 c_schmitz Status resolved => closed
2013-12-19 09:43 c_schmitz Relationship added related to 08438