Check out the LimeSurvey source code on GitHub!

conditions not working when using TOKEN:ATTRIBUTE_1

More
2 years 8 months ago #108774 by gadeynebram
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?

Please Log in to join the conversation.

More
2 years 8 months ago #108814 by gadeynebram
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

Please Log in to join the conversation.

More
2 years 7 months ago - 2 years 7 months ago #109958 by lievenpauwels
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: 2 years 7 months ago by lievenpauwels. Reason: typo

Please Log in to join the conversation.

More
2 years 7 months ago #109960 by DenisChenu

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

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
2 years 7 months ago #109965 by lievenpauwels
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 :-)

Please Log in to join the conversation.

More
2 years 7 months ago #109967 by lievenpauwels
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 ;)

Please Log in to join the conversation.

More
2 years 5 months ago #111661 by diegoviegas
An update to other on this condition: after updating to the very last version available, the problem was solved here.
Thanks!!

Please Log in to join the conversation.

More
2 years 5 months ago #111665 by duvemyster
Could experiences above be related to this?: bugs.limesurvey.org/view.php?id=9169

Please Log in to join the conversation.

More
2 years 5 months ago #111668 by diegoviegas
Sorry, I didn't use the email feature, so I can't say about it.

Please Log in to join the conversation.

More
2 years 5 months ago #111715 by Mazi
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)survey-consulting.com'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form