View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 17387 | Bug reports | Survey participants (Tokens) | public | 2021-06-23 17:34 | 2021-07-05 09:57 |
| Reporter | Mazi | Assigned To | galads | ||
| Priority | none | Severity | block | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 3.25.20 | ||||
| Summary | 17387: Token placeholder from editor use invalid placeholders then do not get replaced at admin notification | ||||
| Description | When using the placehlder icon from the editor to add placeholders like {FIRSTNAME} or {ATTRIBUTE_1}, these do NOT get replaced at the admin notification emails. Only syntax {TOKEN:value} works, see attached screenshots. The basic placeholders as the yget added when using the editor do not get replaced corectly. | ||||
| Steps To Reproduce | Create a non-anonymous survey with tokens. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Bug heat | 8 | ||||
| Complete LimeSurvey version number (& build) | 3.27.4+210622 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | Chrome | ||||
| Database type & version | MySQL 5 | ||||
| Server OS (if known) | Ubuntu 20 | ||||
| Webserver software & version (if known) | Apache | ||||
| PHP Version | 7.2.26 | ||||
|
The issue is in «When using the placeholder icon from the editor» right ? Because « Placeholder {FIRSTNAME} should NOT be replaced, only placeholder {TOKEN:LASTNAME}» Right ? |
|
|
Correct, the default placeholders like {FIRSTNAME} do not get replaced. Only syntax {TOKEN:FIRSTNAME} works. |
|
|
Token placeholder from editor use invalid placeholders then do not get replaced at admin notification Long title ;) |
|
|
Why shouldn't {FIRSTNAME} be replaced...? |
|
|
We are during survey … the question is why it should be replaced ?
Maybe best solution is to directly use {TOKEN:FIRSTNAME} in replacement ? |
|
|
Well, if the editor is offering a placeholder for first name and you can add it that way, then that should work. Currently it does not work. Furthermore, if we can currently use the {TOKEN:FIRSTNAME} placeholder at emails for anonymous surveys, then we should keep that behavior. Because when changing this, we may break many running Limesurvey projects which may make use of this. |
|
|
In anonymous survey , in admin email : {TOKEN:FIRSTNAME} is replaced by a blank value :) Else : my idea is to don't update anything on PHP part , but only on JS part : when : in the limereplacement field you select First Name : it put {TOKEN:FIRSTNAME} : because it work in all email. PS : strangely : it seems to be OK in 5.X : https://github.com/LimeSurvey/LimeSurvey/blob/2cdd434cd03f33fa3a4f71add3000b6909611048/application/controllers/LimereplacementfieldsController.php#L297-L298 |
|
|
It's seems to be OK with popup html editor too ? |
|
|
Same with HTML inline editor : select in Lime replacement fiels 'First name of this user" : {TOKEN:FIRSTNAME} |
|
|
Wow, VERY weird: I did another test using the default editor settings and selected the "first name from token" placeholder -> it was adding {FIRSTNAME}. I then logged out and logged in using EN language because I wanted to create a screenshot for you. I selected the "first name from token" placeholder -> NOW it was adding {TOKEN:FIRSTNAME}. I then logged out again and logged in using DE. I selected the "first name from token" placeholder -> NOW it was adding {TOKEN:FIRSTNAME} as well. Could that be related to some caching and doing an update yesterday? |
|
|
I can also not reproduce this issue. I jsut tested now. |
|
|
@DenisChenu, can the behavior described at my previous comment be caused by caching and updating? @galads, I think we can close this for now. |
|
|
No idea |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2021-06-23 17:34 | Mazi | New Issue | |
| 2021-06-23 17:34 | Mazi | File Added: image.png | |
| 2021-06-23 17:34 | Mazi | File Added: image-2.png | |
| 2021-06-23 17:37 | DenisChenu | Note Added: 65029 | |
| 2021-06-23 17:41 | Mazi | Note Added: 65030 | |
| 2021-06-23 17:46 | DenisChenu | Summary | Token placeholder do not get replaced at admin notification => Token placeholder from editor use invalid placeholders then do not get replaced at admin notification |
| 2021-06-23 17:46 | DenisChenu | Description Updated | |
| 2021-06-23 17:46 | DenisChenu | Steps to Reproduce Updated | |
| 2021-06-23 17:47 | DenisChenu | Note Added: 65031 | |
| 2021-06-23 20:00 | ollehar | Note Added: 65034 | |
| 2021-06-24 08:37 | DenisChenu | Note Added: 65036 | |
| 2021-06-24 11:58 | Mazi | Note Added: 65040 | |
| 2021-06-24 12:20 | DenisChenu | Note Added: 65041 | |
| 2021-06-24 12:23 | DenisChenu | Note Added: 65042 | |
| 2021-06-24 12:23 | DenisChenu | File Added: Peek 24-06-2021 12-22.gif | |
| 2021-06-24 12:25 | DenisChenu | Note Added: 65043 | |
| 2021-06-24 12:30 | Mazi | Note Added: 65044 | |
| 2021-06-28 14:16 | galads | Note Added: 65124 | |
| 2021-06-28 14:16 | galads | Assigned To | => galads |
| 2021-06-28 14:16 | galads | Status | new => feedback |
| 2021-06-29 12:40 | Mazi | Note Added: 65156 | |
| 2021-06-29 12:40 | Mazi | Status | feedback => assigned |
| 2021-06-29 12:40 | DenisChenu | Note Added: 65157 | |
| 2021-07-05 09:57 | galads | Status | assigned => closed |
| 2021-07-05 09:57 | galads | Resolution | open => fixed |