Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

#token disappeared from question html

More
1 day 19 hours ago #272821 by ployrich
Please help us help you and fill where relevant:
LimeSurvey version: 6.15.14 and 6.15.5
Own server or LimeSurvey Cloud: self hosted
Survey theme/template: customized from skelvanilla / fruity
==================
Up until version 6.15.5 there used to be a hidden input element in limesurvey as such:
Code:
<input id="token" type="hidden" value="BdjgvTV5" name="token">

I just upgraded to 6.15.14 and suddenly it is not there anymore on question pages, only on the welcome page I had access.

Is that a feature or a bug?

Thank you in advance
 

Please Log in to join the conversation.

More
1 day 18 hours ago #272823 by holch
I just checked with LS 6.15.4 and I can confirm that this code snipped is there, also on the subsequent pages.
Code:
<input id="token" type="hidden" value="BdjgvTV5" name="token">

Will do an update to confirm that the code snippet disappears. But, does the survey work just like normal? Does this cause any impact?

I assume that this is the way the token is passed on to the response table. Once it is written into the database (by clicking the first "next" button), the token is stored and doesn't need to be in a hidden element anymore. But I am not a developer, so I might be wrong. As long as the token based surveys work just like normal, I don't see any issues with not having this on the subsequent pages.

You can always access the token via {TOKEN} within the survey, where needed.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

More
1 day 17 hours ago #272824 by ployrich
Thank you for the answer
The survey does sort of work as normal, but my theme was relying heavily on this element, thats why I noticed. {TOKEN} doesnt work in custom js scripts loaded in the theme, does it? 

I also noticed that the "same phenomenon" happend to the beforeQuestionrender Event, there is also no token in
Code:
Yii::app()->request->getParam('token');
anymore, which is also fine because i have access to the session.

I am mostly wondering, if it was a conscious change and why somewhere between those versions?

Please Log in to join the conversation.

More
1 day 17 hours ago - 1 day 17 hours ago #272825 by tpartner

The survey does sort of work as normal, but my theme was relying heavily on this element, thats why I noticed. {TOKEN} doesnt work in custom js scripts loaded in the theme, does it? 
No, the {TOKEN} placeholder won't work in custom.js but you should be able to insert that hidden input in one of the survey theme Twig files.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 1 day 17 hours ago by tpartner.
The following user(s) said Thank You: ployrich

Please Log in to join the conversation.

More
1 day 17 hours ago #272828 by holch

I am mostly wondering, if it was a conscious change and why somewhere between those versions?
 
Yeah, I found this strange as well. I would not expect such a change between minor versions. But then, for most people it is probably not a big deal either. Now, for you with a theme that heavily relies on this, this can be an issue.

However, maybe there are more issues involved than just custom themes.

I feel like this issue here might be related to the disappearance of the hidden token field?
forums.limesurvey.org/forum/design-issue...g-language-in-survey

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

More
1 day 16 hours ago #272831 by ployrich
So basically i can just rebuild that element i have been relying on. Thank you.

 

Please Log in to join the conversation.

More
1 day 16 hours ago #272832 by ployrich
Might be, have to read the other post more closely. 

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose