Welcome, Guest
Username: Password: Remember me

TOPIC: conditions not working when using TOKEN:ATTRIBUTE_1

conditions not working when using TOKEN:ATTRIBUTE_1 4 months 2 weeks ago #108774

Hi,

I've recently upgraded limesurvey to the latest version.

Some of my questions have conditions like this one:
((TOKEN:ATTRIBUTE_1 == "USA")) or ((TOKEN:ATTRIBUTE_1 == "Hungary FS"))

But even when one of these values are present in the token table, they are not beiing displayed.

Can anyone help me with this?
The administrator has disabled public write access.

conditions not working when using TOKEN:ATTRIBUTE_1 4 months 2 weeks ago #108814

I've enabled the debug mode but this does not show any errors.

I've also added the {TOKEN:ATTRIBUTE_1} tag in a questions to see what the value is that lime survey uses. This is shown empty.

It is rather strange but at one time suddenly the value of the attribute appeared and from then on the condition was working fine. Subsequent new tokens worked also fine.

I then reloaded the LSS file to reproduce what had fixed this. However now it is not working any more again.

So I'm wondering why it worked. Could this be a SESSION issue?

What I did was the following:
-remove the conditions with token:attribute_1
-add them again
-add {TOKEN:ATTRIBUTE_1} in a question of the previous question group and one in a question of question group containing the conditions.
-opened the survey with the normal url
-opened the survey with an URL were I appended /token/nr
The administrator has disabled public write access.

conditions not working when using TOKEN:ATTRIBUTE_1 3 months 2 weeks ago #109958

Hi, I also have this problem.
I created a survey on your demo server and the above described conditions worked well.
On our WAMP server i installed the latest LimeSurvey 2.05+ Build 140612. and after a flawless installation i created the same survy but the conditions did not work.
I installed on an other LAMP server again LimeSurvey 2.05+ Build 140612, the same problem

I tried importing the survey from your demoserver where it worked well but again on both servers the condition was likely not matched cfr ((TOKEN:ATTRIBUTE_1 == "Merk"))
Where Merk is a value in the tokens table in the attribute_1 field.
In the Manage token attribute fields tab the sample data shows this value "Merk" so that works.

Can someone find a solution for this. The conditions worked well in version 1.92

Our servers:
XAMP
Windows Server 2008 R2 64bit
Mysql Serverversie: 5.5.8
Apache/2.2.17 (Win32)
PHP Version 5.3.5


LAMP
Linux latest Ubuntu 14 64bit
Apache/2.4.7 (Ubuntu)
Mysql Serverversie: 5.5.37-0ubuntu0.14.04.1 - (Ubuntu)
PHP Version 5.5.9
Last Edit: 3 months 2 weeks ago by lievenpauwels. Reason: typo
The administrator has disabled public write access.

conditions not working when using TOKEN:ATTRIBUTE_1 3 months 2 weeks ago #109960

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6362
  • Thank you received: 827
  • Karma: 245
gadeynebram wrote:
I've also added the {TOKEN:ATTRIBUTE_1} tag in a questions to see what the value is that lime survey uses. This is shown empty.
Can be happen in 2 times:
- Survey is anonymous
- You start a survey with a token, test another group etc ...

The token information are provided by $_SESSION, then to test the best is to use a url with newtest/Y or newtest=Y
The administrator has disabled public write access.

conditions not working when using TOKEN:ATTRIBUTE_1 3 months 2 weeks ago #109965

the tokens need to have a value for ATTRIBUTE_1 of course, in my surveys they do have is. The strange thing is at demo.limesurvey.rog it works i suppose it does not heve the newest version.
I now downgraded to 1.92, there it works, next step is v2 and then the oldest version of 2.5
and yes the survey is not anonymous even with anonymous it does not work on the newest version here but it does also work on demo.limesurvey.org AND on my latest 1.92 :-)
The administrator has disabled public write access.

conditions not working when using TOKEN:ATTRIBUTE_1 3 months 2 weeks ago #109967

upgraded 1.92 to version 2.00
it still works :woohoo: , as i cant fid a newer version than the latest, I will stick with version 2.00 untill another version pops up ;)
The administrator has disabled public write access.

conditions not working when using TOKEN:ATTRIBUTE_1 1 month 2 weeks ago #111661

An update to other on this condition: after updating to the very last version available, the problem was solved here.
Thanks!!
The administrator has disabled public write access.

conditions not working when using TOKEN:ATTRIBUTE_1 1 month 2 weeks ago #111665

  • duvemyster
  • duvemyster's Avatar
  • OFFLINE
  • Gold Donor
  • Posts: 17
  • Thank you received: 4
  • Karma: 1
Could experiences above be related to this?: bugs.limesurvey.org/view.php?id=9169
The administrator has disabled public write access.

conditions not working when using TOKEN:ATTRIBUTE_1 1 month 2 weeks ago #111668

Sorry, I didn't use the email feature, so I can't say about it.
The administrator has disabled public write access.

conditions not working when using TOKEN:ATTRIBUTE_1 1 month 1 week ago #111715

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
duvemyster, there most probably is no connection to this issue. conditions and placeholders at emails refer to different code.

The problem described here is caused by mixed sessions. The common user shouldn't see such a problem because he only starts the survey and creates a single question only.
When switching from admin backend to the survey and using preview modes, session data can be mixed up/missing and the token attributes could be treated as empty.
Solution: Try calling the survey logic file before testing or use a different browser for testing the survey (previews).

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.133 seconds
Donation Image