View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06007Bug reportsSurvey participants (Tokens)public2012-04-18 22:59
Reporteruser19322Assigned ToTMSWhite  
PriorityhighSeverityminor 
Status closedResolutionfixed 
Product Version1.92+ 
Fixed in Version1.92+ 
Summary06007: Token variables resolving as 'undefined variable' after Version 1.91+ Build 11026
Description

Factually:

  • I'm new to LimeSurvey (Great product BTW)
  • I created a 3 question survey.
  • The appearance of the first 2 questions are dependent on Token content, checked via a regular expression.
  • I also display a 'hello' type message to the person's name against the token entered.
  • Was all working fine on Version 1.91+ Build 11026
  • Upgraded to Version 1.92+ Build 120412
  • {TOKEN:TOKEN} variable wherever used was then displayed as red with red outline, mouseover stating 'undefined variable'
  • The 'Comfort Update' process was used to update LimeSurvey
  • Absolutely no issues were encountered during the update process
Steps To Reproduce
  1. Install LimeSurvey Version 1.91+ Build 11026
  2. Import attached survey.
  3. Activate token table.
  4. Add tokens with token codes 'B123','C123' and 'A123'.
  5. Test the survey with the token codes to confirm
    a) different questions appear depending on the token code entered
    b) the greeting for the question group is 'Response from {TOKEN:FIRSTNAME} {TOKEN:LASTNAME}'
  6. Use Comfort Update to update LimeSurvey to Version 1.92+ Build 120412
  7. Re-execute from step 4.
Additional Information

Expected Result:
Survey continues to behave as expected.

Actual Result:
Survey shows undefined variables wherever TOKEN variables are referenced. Especially in the Logic File.

ATTACHMENTS:

  1. Survey Used
  2. Logic file showing errors after upgrade
TagsNo tags attached.
Attached Files
Logic File - Survey #26991.htm (16,366 bytes)   
��<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

        <head>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <title>Logic File - Survey #26991</title>

<style type="text/css">

tr.LEMgroup td

{

background-color:lightgrey;

}



tr.LEMquestion

{

background-color:#EAF2D3;

}



tr.LEManswer td

{

background-color:white;

}



.LEMerror

{

color:red;

font-weight:bold;

}



tr.LEMsubq td

{

background-color:lightyellow;

}

</style>

    </head>

    <body><H3>Logic File for Survey # 26991</H3>

<p class='LEMerror'>2 question(s) contain errors that need to be corrected</p>

<table border='1'><tr><th>#</th><th>Name [ID]</th><th>Relevance [Validation] (Default)</th><th>Text [Help] (Tip)</th></tr>

<tr class='LEMgroup'><td>G-0</td><td><b>Response from <span style='background-color: #eee8aa;'><span title='Undefined variable' style='border-style: solid; border-width: 2px; border-color: red;'><span title='Undefined variable' style='color: red; font-weight: bold'>TOKEN:FIRSTNAME</span></span></span> <span style='background-color: #eee8aa;'><span title='Undefined variable' style='border-style: solid; border-width: 2px; border-color: red;'><span title='Undefined variable' style='color: red; font-weight: bold'>TOKEN:LASTNAME</span></span></span></b><br/>[<a target='_blank' href='http://xn--sylviaandrew-4h5ua.com/rsvp/admin/admin.php?action=orderquestions&sid=26991&gid=7'>GID 7</a>]</td><td><span style='background-color: #eee8aa;'>1</span></td><td>&nbsp;</td></tr>

<tr class='LEMquestion'><td class='LEMerror' title='This question has at least 2 error(s)'>Q-0</td><td><b><span style='color:red'>*</span>CN_Wedding</b><br/>[<a target='_blank' href='http://xn--sylviaandrew-4h5ua.com/rsvp/admin/admin.php?sid=26991&gid=7&qid=13'>QID 13</a>]<br/>List (radio) [L]</td><td><span style='background-color: #eee8aa;'>((<span title='Compare a string to a regular expression pattern; bool regexMatch(pattern,input)' style='color: blue; font-weight: bold'>regexMatch</span>(<span title='' style='color: gray'>"/(C|B|c|b)/"</span>, <span title='Undefined variable' style='border-style: solid; border-width: 2px; border-color: red;'><span title='Undefined variable' style='color: red; font-weight: bold'>TOKEN:TOKEN</span></span>)))</span><br/>(DEFAULT:  0)</td><td><p>

	Select an option below to indicate the number of people that will be able to attend the wedding in <em><u><strong>China</strong></u></em>.</p>

<hr/><table border='1'><tr><th>Question Attribute</th><th>Value</th></tr>

<tr><td>display_columns</td><td>1</td></tr>

</table>

</td></tr>

<tr class='LEManswer'><td>A[0]-1</td><td><b>0</b></td><td>[VALUE: 0]</td><td>0 - Nobody invited will be able to attend.</td></tr>

<tr class='LEManswer'><td>A[0]-2</td><td><b>1</b></td><td>[VALUE: 1]</td><td>1 - I will attend.</td></tr>

<tr class='LEManswer'><td>A[0]-3</td><td><b>2</b></td><td>[VALUE: 2]</td><td>2 - I will attend with one other.</td></tr>

<tr class='LEManswer'><td>A[0]-4</td><td><b>3</b></td><td>[VALUE: 3]</td><td>3 - We all will attend (invitations to 3 or more).</td></tr>

<tr class='LEMquestion'><td >Q-1</td><td><b><span style='color:red'>*</span>CN_Wedding_Numbers</b><br/>[<a target='_blank' href='http://xn--sylviaandrew-4h5ua.com/rsvp/admin/admin.php?sid=26991&gid=7&qid=14'>QID 14</a>]<br/>List (dropdown) [!]</td><td><span style='background-color: #eee8aa;'>((<span title='[java26991X7X13][G:0][Q:0]: &lt;p&gt;

	Select an option below to indicate the number of people that will be able to attend the wedding in &lt;em&gt;&lt;u&gt;&lt;strong&gt;China&lt;/strong&gt;&lt;/u&gt;&lt;/em&gt;.&lt;/p&gt;

; ,&#039;answers&#039;:{  &#039;0~0&#039;:&#039;0|0 - Nobody invited will be able to attend.&#039;,&#039;0~1&#039;:&#039;1|1 - I will attend.&#039;,&#039;0~2&#039;:&#039;2|2 - I will attend with one other.&#039;,&#039;0~3&#039;:&#039;3|3 - We all will attend (invitations to 3 or more).&#039; }; value=0' style='color: #4C88BE; font-weight: bold' onclick='window.open("http://xn--sylviaandrew-4h5ua.com/rsvp/admin/admin.php?sid=26991&gid=7&qid=13");'>CN_Wedding.NAOK</span> == <span title='' style='color: gray'>"3"</span>))</span></td><td>In total, how many people will be attending?</td></tr>

<tr class='LEManswer'><td>A[0]-1</td><td><b>3</b></td><td>[VALUE: 3]</td><td>3 - Three people</td></tr>

<tr class='LEManswer'><td>A[0]-2</td><td><b>4</b></td><td>[VALUE: 4]</td><td>4 - Four People</td></tr>

<tr class='LEMquestion'><td class='LEMerror' title='This question has at least 1 error(s)'>Q-2</td><td><b><span style='color:red'>*</span>AU_Wedding</b><br/>[<a target='_blank' href='http://xn--sylviaandrew-4h5ua.com/rsvp/admin/admin.php?sid=26991&gid=7&qid=15'>QID 15</a>]<br/>List (radio) [L]</td><td><span style='background-color: #eee8aa;'>((<span title='Compare a string to a regular expression pattern; bool regexMatch(pattern,input)' style='color: blue; font-weight: bold'>regexMatch</span>(<span title='' style='color: gray'>"/(A|B|a|b)/"</span>, <span title='Undefined variable' style='border-style: solid; border-width: 2px; border-color: red;'><span title='Undefined variable' style='color: red; font-weight: bold'>TOKEN:TOKEN</span></span>)))</span></td><td><p>

	Select an option below to indicate the number of people that will be able to attend the wedding in <u><em><strong>Australia</strong></em></u>.</p>

<hr/><table border='1'><tr><th>Question Attribute</th><th>Value</th></tr>

<tr><td>display_columns</td><td>1</td></tr>

</table>

</td></tr>

<tr class='LEManswer'><td>A[0]-1</td><td><b>0</b></td><td>[VALUE: 0]</td><td>0 - Nobody invited will be able to attend.</td></tr>

<tr class='LEManswer'><td>A[0]-2</td><td><b>1</b></td><td>[VALUE: 1]</td><td>1 - I will attend.</td></tr>

<tr class='LEManswer'><td>A[0]-3</td><td><b>2</b></td><td>[VALUE: 2]</td><td>2 - I will attend with one other.</td></tr>

<tr class='LEManswer'><td>A[0]-4</td><td><b>3</b></td><td>[VALUE: 3]</td><td>3 - We all will attend (invitations to 3 or more).</td></tr>

<tr class='LEMquestion'><td >Q-3</td><td><b><span style='color:red'>*</span>AU_Wedding_Numbers</b><br/>[<a target='_blank' href='http://xn--sylviaandrew-4h5ua.com/rsvp/admin/admin.php?sid=26991&gid=7&qid=16'>QID 16</a>]<br/>List (dropdown) [!]</td><td><span style='background-color: #eee8aa;'>((<span title='[java26991X7X15][G:0][Q:2]: &lt;p&gt;

	Select an option below to indicate the number of people that will be able to attend the wedding in &lt;u&gt;&lt;em&gt;&lt;strong&gt;Australia&lt;/strong&gt;&lt;/em&gt;&lt;/u&gt;.&lt;/p&gt;

; ,&#039;answers&#039;:{  &#039;0~0&#039;:&#039;0|0 - Nobody invited will be able to attend.&#039;,&#039;0~1&#039;:&#039;1|1 - I will attend.&#039;,&#039;0~2&#039;:&#039;2|2 - I will attend with one other.&#039;,&#039;0~3&#039;:&#039;3|3 - We all will attend (invitations to 3 or more).&#039; }' style='color: #4C88BE; font-weight: bold' onclick='window.open("http://xn--sylviaandrew-4h5ua.com/rsvp/admin/admin.php?sid=26991&gid=7&qid=15");'>AU_Wedding.NAOK</span> == <span title='' style='color: gray'>"3"</span>))</span></td><td>In total, how many people will be attending?</td></tr>

<tr class='LEManswer'><td>A[0]-1</td><td><b>3</b></td><td>[VALUE: 3]</td><td>3 - Three people</td></tr>

<tr class='LEManswer'><td>A[0]-2</td><td><b>4</b></td><td>[VALUE: 4]</td><td>4 - Four People</td></tr>

<tr class='LEMgroup'><td>G-1</td><td><b>Comments or Questions</b><br/>[<a target='_blank' href='http://xn--sylviaandrew-4h5ua.com/rsvp/admin/admin.php?action=orderquestions&sid=26991&gid=8'>GID 8</a>]</td><td><span style='background-color: #eee8aa;'>1</span></td><td>&nbsp;</td></tr>

<tr class='LEMquestion'><td >Q-4</td><td><b>CommentsQuestions</b><br/>[<a target='_blank' href='http://xn--sylviaandrew-4h5ua.com/rsvp/admin/admin.php?sid=26991&gid=8&qid=17'>QID 17</a>]<br/>Long free text [T]</td><td><span style='background-color: #eee8aa;'>1</span></td><td>If you have any further comments or questions, please outline them in the text box below.<hr/><table border='1'><tr><th>Question Attribute</th><th>Value</th></tr>

<tr><td>time_limit_action</td><td>1</td></tr>

</table>

</td></tr>

</table></body></html>
Logic File - Survey #26991.htm (16,366 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)120412
I will donate to the project if issue is resolvedNo
BrowserBoth IE9 and Mozilla (Latest)
Database type & versionMySQL client version: 5.1.56
Server OS (if known)*nix
Webserver software & version (if known)Apache (not sure of version)
PHP Version5.3.10

Users monitoring this issue

There are no users monitoring this issue.

Activities

TMSWhite

TMSWhite

2012-04-12 16:14

reporter   ~18339

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

TMSWhite

TMSWhite

2012-04-16 18:30

reporter   ~18384

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

c_schmitz

c_schmitz

2012-04-18 22:59

administrator   ~18428

1.92+ Build 120418 released

Related Changesets

LimeSurvey: master 234b9aac

2012-04-12 07:14:28

TMSWhite

Details Diff
Fixed issue 06007: Token variables resolving as 'undefined variable' after Version 1.91+ Build 11026
Dev This is actually a bug on the conditions editor - it should generate {TOKEN}, not {TOKEN:TOKEN}. But to support backwards compatability,EM is letting TOKEN:TOKEN be an alias for TOKEN
Affected Issues
06007
mod - classes/expressions/LimeExpressionManager.php Diff File

LimeSurvey: Yii 3d9e32b9

2012-04-16 09:02:49

TMSWhite

Details Diff
Fixed issue 06007: Token variables resolving as 'undefined variable' after Version 1.91+ Build 11026
Dev This is actually a bug on the conditions editor - it should generate {TOKEN}, not {TOKEN:TOKEN}. But to support backwards compatability,EM is letting TOKEN:TOKEN be an alias for TOKEN
Affected Issues
06007
mod - application/helpers/expressions/em_manager_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-04-12 10:30 user19322 New Issue
2012-04-12 10:30 user19322 File Added: Logic File - Survey #26991.htm
2012-04-12 10:33 user19322 File Added: DEMO_limesurvey_survey_26991.lss
2012-04-12 10:34 user19322 Issue Monitored: user19322
2012-04-12 13:34 c_schmitz Assigned To => TMSWhite
2012-04-12 13:34 c_schmitz Status new => assigned
2012-04-12 16:14 TMSWhite Changeset attached => LimeSurvey master 234b9aac
2012-04-12 16:14 TMSWhite Note Added: 18339
2012-04-12 16:14 TMSWhite Resolution open => fixed
2012-04-12 16:16 TMSWhite Status assigned => resolved
2012-04-16 18:30 TMSWhite Changeset attached => LimeSurvey Yii 3d9e32b9
2012-04-16 18:30 TMSWhite Note Added: 18384
2012-04-18 22:58 c_schmitz Fixed in Version => 1.92+
2012-04-18 22:59 c_schmitz Note Added: 18428
2012-04-18 22:59 c_schmitz Status resolved => closed
2016-12-08 10:39 c_schmitz Category Tokens => Survey participants (Tokens)