- Posts: 15
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Enable token-based response persistence is not working as expected
- ictfinance
- Topic Author
- Offline
- New Member
Less
More
3 years 9 months ago #202038
by ictfinance
Enable token-based response persistence is not working as expected was created by ictfinance
Hi,
My colleague set up a survey with participants. Each participant has a token. She turned on the option "Enable token-based response persistence", in order to allow people to return to the screen they left if they didn't complete the survey.
I tested it. It is working if I don't close my browser. If I close my browser and click on the link to return to the survey, a new blank form opens. In the survey answers, I can see that LS created a new entry in the responses.
How is the "Enable token-based response persistence" mechanism working? Does it use the PHPsessionID cookie?
What are we doing wrong?
Best regards,
Pierre
My colleague set up a survey with participants. Each participant has a token. She turned on the option "Enable token-based response persistence", in order to allow people to return to the screen they left if they didn't complete the survey.
I tested it. It is working if I don't close my browser. If I close my browser and click on the link to return to the survey, a new blank form opens. In the survey answers, I can see that LS created a new entry in the responses.
How is the "Enable token-based response persistence" mechanism working? Does it use the PHPsessionID cookie?
What are we doing wrong?
Best regards,
Pierre
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 9 months ago #202042
by DenisChenu
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 Enable token-based response persistence is not working as expected
Survey is not anonymous ?
It must work with just reloading with same token.
LimeSurvey version can be interseting too.
It must work with just reloading with same token.
LimeSurvey version can be interseting too.
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.
- ictfinance
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
3 years 9 months ago #202045
by ictfinance
Replied by ictfinance on topic Enable token-based response persistence is not working as expected
Hi Denis,
LS version is 3.22.17+200525
Survey is not anonymous. See a screenshot of the settings in attachment
LS version is 3.22.17+200525
Survey is not anonymous. See a screenshot of the settings in attachment
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
3 years 9 months ago #202062
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Enable token-based response persistence is not working as expected
Is your survey mode "all in one page"?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- ictfinance
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
3 years 9 months ago #202071
by ictfinance
Replied by ictfinance on topic Enable token-based response persistence is not working as expected
Hi,
No, survey format is "group by group".
Cheers
No, survey format is "group by group".
Cheers
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
3 years 9 months ago #202073
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Enable token-based response persistence is not working as expected
Ok, so in group by group your respondent should jump to the latest group he/she was on when closing the browser, if the survey is not anonymous.
Weird. Not sure how to help right now, because this should work.
Weird. Not sure how to help right now, because this should work.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 9 months ago #202080
by DenisChenu
Same,
Checked (again) in 3.22.24 / git : OK no issue.
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 Enable token-based response persistence is not working as expected
Yes,holch wrote: …
Weird. Not sure how to help right now, because this should work.
Same,
Checked (again) in 3.22.24 / git : OK no issue.
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.
- ictfinance
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
3 years 9 months ago #202081
by ictfinance
Replied by ictfinance on topic Enable token-based response persistence is not working as expected
Yes, that's why I would be interested in learning how the system works for bringing the user back where he left. I suppose it doesn't rely on the use of cookies? Because only the PHPSESSID cookie is present.
And in fact it works if the browser is not closed. If I fill in the survey and leave by closing my browser tab, and then reopen a new tab and use the url to the survey, I come back where I left. But if I close my browser and open it and go to the url of the survey, I arrive on the first page, and LS creates a new entry in the table of responses.
Best regards,
Pierre
And in fact it works if the browser is not closed. If I fill in the survey and leave by closing my browser tab, and then reopen a new tab and use the url to the survey, I come back where I left. But if I close my browser and open it and go to the url of the survey, I arrive on the first page, and LS creates a new entry in the table of responses.
Best regards,
Pierre
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 9 months ago #202083
by DenisChenu
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 Enable token-based response persistence is not working as expected
Coide is here :
github.com/LimeSurvey/LimeSurvey/blob/3....urvey/index.php#L506
It reload existing response in $_SESSION
It reload existing response in $_SESSION
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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
3 years 9 months ago #202086
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Enable token-based response persistence is not working as expected
Pierre, can you try with a different browser to eliminate the possibility of a browser add-on/plugin causing the problem?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- ictfinance
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
3 years 9 months ago - 3 years 9 months ago #202087
by ictfinance
Replied by ictfinance on topic Enable token-based response persistence is not working as expected
Thanks for the link. I tracked down the problem: $token is empty.
On line 491 I found this:
else {
// Must never happen : unset invalid token for the second time
$token = null;
}
This code was embedded in the build released on the 25th of May, but has been deleted on the 25th of May by Shnoulle
Now everything works as expected.
Thanks to all of you for your help.
On line 491 I found this:
else {
// Must never happen : unset invalid token for the second time
$token = null;
}
This code was embedded in the build released on the 25th of May, but has been deleted on the 25th of May by Shnoulle
Now everything works as expected.
Thanks to all of you for your help.
Last edit: 3 years 9 months ago by ictfinance.
The topic has been locked.
- ictfinance
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
3 years 9 months ago #202113
by ictfinance
Replied by ictfinance on topic Enable token-based response persistence is not working as expected
OK, the problem described at the top is indeed solved. But another problem appeared. We have another survey, where there is one single participant, with a token. The token has been given to several people, and they use this token in order to answer the survey. Each time a participant connects to the survey, a new record is created in the table with the responses. Now I made the change described above for fixing the problem, it doesn't work anymore: after entering the token, I get a blank screen.
I just used Comfort update to install the latest update (Version 3.22.24+200630), and the problem persists.
Any idea?
Best regards,
Pierre
I just used Comfort update to install the latest update (Version 3.22.24+200630), and the problem persists.
Any idea?
Best regards,
Pierre
The topic has been locked.