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).
 20
IDProjectCategoryView StatusLast Update
14288Bug reportsExpression Managerpublic2019-04-30 09:12
Reportermad99 Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.15.x 
Fixed in Version3.15.x 
Summary14288: TOKEN:ATTRIBUTE_INT: No output in email-template AND no Error in validate expression
Description

I fugure out with very tedious try & error, that the Expression Manager does not work consistent or at least expect different placeholders/expressions in the email-template and text-editor for all the other survey-places.

See Forum-Topic for Details: https://www.limesurvey.org/forum/design-issues/117048-email-template-if-statement-with-placeholder-token-does-not-work#177430

So, hulch ment:
«I don't think it is good in terms of compatibility and consistency to use ATTRIBUTE_1 in emails but TOKEN:ATTRIBUTE_1 in the rest of the survey.
Maybe a feature request? I think this might be considered a "feature" by developers, but you never know. »

For that I wrote an other report: https://bugs.limesurvey.org/view.php?id=14287
Also for missing documentation about detailed use of {if}-statement and the differences between use in email-template and other text for survey:
https://bugs.limesurvey.org/view.php?id=14286

But at the end, at least the button «validate expressions» in Expression-Manager and the code behind has a bug. Because with «wrong» Placeholder in email-template {TOKEN:ATTRIBUTE_1} there is NO «error marking».

But 1 step before, there must be a bug in the code. Because:

  1. the "wrong" Placeholder {TOKEN:ATTRIBUTE_1} print_out the value from ATTRIBUTE_1.
  2. At the same time, however, the IF clause is not translated and nothing print_out in email.

So the bug is The error/bug is either, because the wrong expression for email is output a value, or the wrong expression for email is not translated in the If-statement.
See for details topic in forum: https://www.limesurvey.org/forum/design-issues/117048-email-template-if-statement-with-placeholder-token-does-not-work

Both CAN NOT BE RIGHT.
Best would be to allow also {TOKEN:ATTRIBUTE_1} in email for backward-compatibility or stop to render the wrong placholder with {TOKEN:X} in front of for email-templates.

But WITHOUT an «error marking» in button «validate expressions» (see above), the correct use is absolutely undetectable. So Maybe the code behind button «validate expressions» has to change, if the error in the rendering-engine will not be fixed.

I hope this bugreport will help new users of limesurvey to get a more positive start in creating email templates or at least reduce the time needed for it massively.

chuicy regards
Martin

Steps To Reproduce

Details see in images

TagsNo tags attached.
Attached Files
Bug heat20
Complete LimeSurvey version number (& build)Version 3.15.5+181115
I will donate to the project if issue is resolvedNo
BrowserAll
Database type & version MySQL 5.5
Server OS (if known)Debian GNU/Linux 8 (jessie)
Webserver software & version (if known)Apache/2.4.10 (Debian)
PHP Version PHP 7.1

Relationships

related to 08683 closedDenisChenu Bug reports Unique custom token values fail to merge in invite/reminder emails 
has duplicate 14286 closedDenisChenu Bug reports The detailed use of {if}-statements: abstract form, difference between text and email and detailed examples for all kind of use 
has duplicate 14287 closedDenisChenu Feature requests cosistent use of ATTRIBUTE_1 OR TOKEN:ATTRIBUTE_1 in email-template and text for survey. 

Activities

mad99

mad99

2018-11-26 18:43

reporter   ~49791

The Expression-Manager template-image was not uploaded > next try

DenisChenu

DenisChenu

2018-11-27 10:07

developer   ~49796

See discussion in https://bugs.limesurvey.org/view.php?id=8683

DenisChenu

DenisChenu

2018-11-27 11:53

developer   ~49805

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

DenisChenu

DenisChenu

2018-11-27 11:54

developer   ~49806

Issue fixed for next release

markusfluer

markusfluer

2018-12-04 17:09

administrator   ~49882

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

c_schmitz

c_schmitz

2019-04-30 09:12

administrator   ~51637

Fixed in Version 3.1.7.3

Related Changesets

LimeSurvey: master 2cc399d6

2018-11-27 11:53:23

DenisChenu

Details Diff
Fixed issue 14288: TOKEN:ATTRIBUTE_INT not replaced in expression for email and reminder
Dev: Use of LimeExpressionManager::singleton()->loadTokenInformation
Affected Issues
14288
mod - application/controllers/admin/tokens.php Diff File

LimeSurvey: master 4a1cc274

2018-11-27 11:53:23

DenisChenu


Committer: markusfluer Details Diff
Fixed issue 14288: TOKEN:ATTRIBUTE_INT not replaced in expression for email and reminder
Dev: Use of LimeExpressionManager::singleton()->loadTokenInformation
Affected Issues
14288
mod - application/controllers/admin/tokens.php Diff File

Issue History

Date Modified Username Field Change
2018-11-26 18:41 mad99 New Issue
2018-11-26 18:41 mad99 File Added: limesurve-email-template-missing-error-mark.png
2018-11-26 18:41 mad99 File Added: limesurve-email-template-rendering-is-not-consistent.png
2018-11-26 18:41 mad99 File Added: limesurve-email-template.png
2018-11-26 18:43 mad99 File Added: limesurve-email-template-2.png
2018-11-26 18:43 mad99 Note Added: 49791
2018-11-27 10:05 DenisChenu Assigned To => DenisChenu
2018-11-27 10:05 DenisChenu Status new => assigned
2018-11-27 10:05 DenisChenu Relationship added has duplicate 14286
2018-11-27 10:06 DenisChenu Relationship added related to 08683
2018-11-27 10:07 DenisChenu Note Added: 49796
2018-11-27 11:53 DenisChenu Changeset attached => LimeSurvey master 2cc399d6
2018-11-27 11:53 DenisChenu Note Added: 49805
2018-11-27 11:53 DenisChenu Resolution open => fixed
2018-11-27 11:54 DenisChenu Status assigned => resolved
2018-11-27 11:54 DenisChenu Fixed in Version => 3.15.x
2018-11-27 11:54 DenisChenu Note Added: 49806
2018-11-27 19:07 DenisChenu Relationship added has duplicate 14287
2018-12-04 17:09 markusfluer Changeset attached => LimeSurvey master 4a1cc274
2018-12-04 17:09 markusfluer Note Added: 49882
2019-04-30 09:12 c_schmitz Note Added: 51637
2019-04-30 09:12 c_schmitz Status resolved => closed