Welcome to the LimeSurvey Community Forum

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

Mixed up relevance equation on resume later using random groups

  • YvesLanglois
  • YvesLanglois's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 8 months ago #141043 by YvesLanglois
Hello,

This bug has given us big trouble since it was detected after the Survey began. Here is a description of the bug and steps to reproduce it. If someone could replicate it I will submit a bug report.

Description:
In the Survey there are 3 groups with random order. We allow participants to resume later and we enabled the "token-based response persistence". I choose to save later when I am answering group X. When I click again the link in the email (browser must be closed at this time, we have Outlook, no web mail, so browser can be closed, should do the same if link is open from word...) then browser opens up but the relevance equations are not updated. The Survey can present blank group Y because the relevance equations are those of group X. If by luck the group presented is still X, then the group is shown but going to next question still gives blank page because the relevance equations are still those of group X. Looking at the source of page, I can see that group Y was generated but relevance equations are for group X (there is a display = none for the group).

Steps to reproduce:
Get email to respond to Survey.
Click link in email and answer 1 question.
Click to go to next question.
Click Save Later.
Close browser.
Click same link in email to continue answering, redo this steps until you are presented another group than the one when you saved.
Look at the source code of the blank group.

Steps to avoid this bug:
This problem doesn't appear when browser is already running and clicking link in email opens another tab.
This doesn't appear when we disable the "token-based response persistence".
If we change language when presented the empty group then LS regenerate a complete page and everything works fine.


Question:
Is there a way to ask LS to regenerate the page (Javascript Location.reload() doesn't work, still same page is produced).

Maybe:
Still similar behavior for random questions instead of groups.


I would gladly appreciate if someone could reproduce it, this will confirm it is not coming from our servers.


Thank you for any help.
The topic has been locked.
  • YvesLanglois
  • YvesLanglois's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 8 months ago #141044 by YvesLanglois
I forgot to mention we are using :

Version 2.50+ Build 160728

The bug was observed in Windows in IE and Chrome.
Also seen in Chrome on Android.


Thank you.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 7 months ago #141084 by holch
How do you generate the random number? Sorry, I don't have time today to install your survey file to check for myself.

From what I read I would bet that the problem is, that the random number is generated again when you reload.

Have a look here in the forum, there are some examples how you can avoid that the random number is generated more than once. You need to check if the number is already set, then use that set number. If not, then generate a random number. I don't have the code here, but it is something like "if is set"...

Hopefully that is the problem, because it is very simple to solve.

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.
  • YvesLanglois
  • YvesLanglois's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #141085 by YvesLanglois
Hello,

I do not generate random number myself. I used the random group option in Limesurvey. The groups are all assigned the same random group in LS. Then the problem happens.

I will try to get a running example, unfortunately the demo version on Limesurvey.com doesn't have the email sending feature and I am not sure if I could replicate the conditions for this in the demo.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 7 months ago #141087 by holch
Ahhh, OK, understood. I must have interpreted your post wrong then.

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.
  • YvesLanglois
  • YvesLanglois's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #141093 by YvesLanglois
Ok, I have found where this behavior came from.

In the URL we send to participants, the "&newtest=Y" should be appended to it. As I understand, this is used to start a new session by LS and force a reevaluation of the Javascript expressions (which were used in the relevance équations). However I do not understand why this is not done by default.

If someone has an explanation of this, I would appreciate.

Thank you.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose