- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
conditions not working when using TOKEN:ATTRIBUTE_1
- gadeynebram
- Topic Author
- Offline
- New Member
Less
More
9 years 10 months ago #108774
by gadeynebram
conditions not working when using TOKEN:ATTRIBUTE_1 was created 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?
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 topic has been locked.
- gadeynebram
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
9 years 10 months ago #108814
by gadeynebram
Replied by gadeynebram on topic conditions not working when using TOKEN:ATTRIBUTE_1
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
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 topic has been locked.
- lievenpauwels
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
9 years 9 months ago - 9 years 9 months ago #109958
by lievenpauwels
Replied by lievenpauwels on topic conditions not working when using TOKEN:ATTRIBUTE_1
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
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: 9 years 9 months ago by lievenpauwels. Reason: typo
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
9 years 9 months ago #109960
by DenisChenu
- 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 , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic conditions not working when using TOKEN:ATTRIBUTE_1
Can be happen in 2 times: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.
- 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 , plugin development .
I don't answer to private message.
The topic has been locked.
- lievenpauwels
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
9 years 9 months ago #109965
by lievenpauwels
Replied by lievenpauwels on topic conditions not working when using TOKEN:ATTRIBUTE_1
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
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 topic has been locked.
- lievenpauwels
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
9 years 9 months ago #109967
by lievenpauwels
Replied by lievenpauwels on topic conditions not working when using TOKEN:ATTRIBUTE_1
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
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 topic has been locked.
- diegoviegas
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
9 years 7 months ago #111661
by diegoviegas
Replied by diegoviegas on topic conditions not working when using TOKEN:ATTRIBUTE_1
An update to other on this condition: after updating to the very last version available, the problem was solved here.
Thanks!!
Thanks!!
The topic has been locked.
- duvemyster
- Offline
- Senior Member
Less
More
- Posts: 60
- Thank you received: 6
9 years 7 months ago #111665
by duvemyster
Replied by duvemyster on topic conditions not working when using TOKEN:ATTRIBUTE_1
Could experiences above be related to this?:
bugs.limesurvey.org/view.php?id=9169
The topic has been locked.
- diegoviegas
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
9 years 7 months ago #111668
by diegoviegas
Replied by diegoviegas on topic conditions not working when using TOKEN:ATTRIBUTE_1
Sorry, I didn't use the email feature, so I can't say about it.
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
9 years 7 months ago #111715
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic conditions not working when using TOKEN:ATTRIBUTE_1
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).
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
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.