- Posts: 4
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Tokens in URL not automatically starting survey
- JA123456
- Topic Author
- Offline
- New Member
Less
More
3 years 5 months ago #206947
by JA123456
Tokens in URL not automatically starting survey was created by JA123456
I have an application that is a dashboard for a bunch of LimeSurvey surveys where users can select their group and take the relevant surveys. The app uses the LimeSurvey API to add a participant to the table and generate a token for them, then include the token in the link for the user. It is formatted as follows:
somewebsite.com/limesurvey/index.php/331...oken=K10D6OI0r3bgZXg
On the production server, when the link is clicked it simply starts the survey as expected. However on the staging server, it leads to a page saying "If you have been issued a token, please enter it in the box below and click continue." and a field for the token. This can be worked around by simply copying the token from the url into the field and submitting the form, but ideally this should work the same as the production server.
Additionally on the staging server, there are issues with the pagination not working in the list surveys page, as well as I get an alert saying "An error occurred while processing the ajax request." when I try to add a subquestion to an array questoin. These issues do not happen on the production server. I would also like to resolve issues, but the issue with the token is more important to me.
Both the production server and the staging server are running Version 3.5.4+180320. The database on the staging server is an import of the one from the production server. The code for the application that links to the LimeSurvey surveys is also identical. I have tried everything from reinstalling LimeSurvey on the staging server, upgrading LimeSurvey to Version 3.24.1, copying the files from the production server to the staging server, consulted the docs to make sure I haven't missed a step, Googled the problem and searched the forums for hours to no avail.
Any help with this would be very much appreciated.
somewebsite.com/limesurvey/index.php/331...oken=K10D6OI0r3bgZXg
On the production server, when the link is clicked it simply starts the survey as expected. However on the staging server, it leads to a page saying "If you have been issued a token, please enter it in the box below and click continue." and a field for the token. This can be worked around by simply copying the token from the url into the field and submitting the form, but ideally this should work the same as the production server.
Additionally on the staging server, there are issues with the pagination not working in the list surveys page, as well as I get an alert saying "An error occurred while processing the ajax request." when I try to add a subquestion to an array questoin. These issues do not happen on the production server. I would also like to resolve issues, but the issue with the token is more important to me.
Both the production server and the staging server are running Version 3.5.4+180320. The database on the staging server is an import of the one from the production server. The code for the application that links to the LimeSurvey surveys is also identical. I have tried everything from reinstalling LimeSurvey on the staging server, upgrading LimeSurvey to Version 3.24.1, copying the files from the production server to the staging server, consulted the docs to make sure I haven't missed a step, Googled the problem and searched the forums for hours to no avail.
Any help with this would be very much appreciated.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
3 years 5 months ago #206950
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 Tokens in URL not automatically starting survey
Are the links on both servers the same? currenlty my first guess would be that LS doesn't recognize the &token in the URL.
E.g. the position of the &token within the URL.
So maybe the newtest or the &email is "blocking" the token from getting recognized?
E.g. the position of the &token within the URL.
Code:
https://.../index.php/331328?newtest=Y&EMAIL=test@test.com&token=K10D6OI0r3bgZXg
So maybe the newtest or the &email is "blocking" the token from getting recognized?
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.
- JA123456
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 1
3 years 5 months ago #206951
by JA123456
Replied by JA123456 on topic Tokens in URL not automatically starting survey
Yes, the link structure is identical. I've removed the additional parameters so it's simply /limesurvey/index.php/331328?token=K10D6OI0r3bgZXg. This allows me to access the survey on the production server fine, but I still hit the token page on the staging server.
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
3 years 5 months ago #206952
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 Tokens in URL not automatically starting survey
Compare the native links for each installation (click on the preview survey buttons). There are config settings that may, for example, remove "index.php".
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
3 years 5 months ago #206953
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 Tokens in URL not automatically starting survey
My opinion : 2 issues with GET param in url (token and pagination + some ajax issue) :! issue in server.
Some «security» in URL ?
Must check server log, not related to LimeSurvey.
Some «security» in URL ?
Must check server log, not related to LimeSurvey.
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.
- JA123456
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 1
3 years 5 months ago #206979
by JA123456
Replied by JA123456 on topic Tokens in URL not automatically starting survey
tpartner: I double checked and native links are identical.
DenisChenu: That is an interesting point. I'm not sure how the server is set up, but I will look into this and let you know what I find.
DenisChenu: That is an interesting point. I'm not sure how the server is set up, but I will look into this and let you know what I find.
The topic has been locked.
- JA123456
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 1
3 years 5 months ago #207016
by JA123456
Replied by JA123456 on topic Tokens in URL not automatically starting survey
DenisChenu was correct. It was an issue with the server configuration. I was missing the ?$args in the try_files line:
location /limesurvey/ {
try_files /$uri $uri /limesurvey/index.php?$args;
}
Thank you all for your help with this.
location /limesurvey/ {
try_files /$uri $uri /limesurvey/index.php?$args;
}
Thank you all for your help with this.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
3 years 5 months ago #207019
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 Tokens in URL not automatically starting survey
Ah you use ngynx with rewrite ⋅ i have a doc issue to fix it
bugs.limesurvey.org/view.php?id=14691
manual.limesurvey.org/General_FAQ#How_ca...to_get_a_shorter_URL
I muts create the complete page for ngynx …
bugs.limesurvey.org/view.php?id=14691
manual.limesurvey.org/General_FAQ#How_ca...to_get_a_shorter_URL
I muts create the complete page for ngynx …
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 following user(s) said Thank You: JA123456
The topic has been locked.