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
  • ictfinance's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202038 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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202042 by DenisChenu
Survey is not anonymous ?

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
  • ictfinance's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202045 by ictfinance
Hi Denis,
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
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202062 by holch
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
  • ictfinance's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202071 by ictfinance
Hi,
No, survey format is "group by group".
Cheers
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202073 by holch
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.

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
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202080 by DenisChenu

holch wrote: …
Weird. Not sure how to help right now, because this should work.

Yes,

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
  • ictfinance's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202081 by ictfinance
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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202083 by DenisChenu
Coide is here : github.com/LimeSurvey/LimeSurvey/blob/3....urvey/index.php#L506

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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202086 by tpartner
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
  • ictfinance's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago - 3 years 9 months ago #202087 by ictfinance
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.
Last edit: 3 years 9 months ago by ictfinance.
The topic has been locked.
  • ictfinance
  • ictfinance's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202113 by ictfinance
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
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose