Welcome, Guest
Username: Password: Remember me

TOPIC: Invalid token error at end of survey

Invalid token error at end of survey 3 years 2 months ago #60651

  • gwadmin
  • gwadmin's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
We are receiving multiple complaints from clients saying that when some of their respondents get to the end of the survey, they are getting a message saying:

This is a controlled survey. You need a valid token to participate.

The token you have provided is either not valid, or has already been used.
For further information contact admin (This email address is being protected from spambots. You need JavaScript enabled to view it.)

When they give me their token number and I double check it, everything is fine, their answers were recorded and their token marked as completed both in the tokens table, and in the survey table. But it's causing a great deal of confusion.

I have not been able to reproduce the error myself. We just recently moved to GoDaddy and installed the latest version of Lime, 1.90+.

Any help you can give would be greatly appreciated. FYI, we're also having problems with session expiration errors. We do not have suhosin installed.

Thanks!

-Travis
The administrator has disabled public write access.

Re: Invalid token error at end of survey 3 years 2 months ago #60747

  • gwadmin
  • gwadmin's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
I guess to give an update/correction, we have two installations of LimeSurvey, on the same server.

The 1.90+installation gives an error saying "You need a valid token to participate" at the end of the survey, when the responses are submitted. And the answers are successfully recorded in spite of the error.

The 1.82+installation gives an error saying "We are sorry but your session has expired" at random times within the survey. I've actually seen this error, and it happened after about 2 minutes.

My guess is there's some root problem that is manifesting itself in different ways depending on the version. Any help would be greatly, greatly appreciated.

-Travis Schlist
Technical & Survey Support
Graceworks Ministries
The administrator has disabled public write access.

Re: Invalid token error at end of survey 3 years 2 months ago #60902

  • onlyrich
  • onlyrich's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
I am having the same issues with mine. I get "We are sorry but your session has expired" after I click next. This happened right after I activated the survey.

Any solution?
The administrator has disabled public write access.

Re: Invalid token error at end of survey 3 years 2 months ago #60907

  • onlyrich
  • onlyrich's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Hey people,

I did some digging. The error message is in the index.php file, and is under an area which is trying to do something with the language. Can anyone understand this code piece that I'm cutting and pasting?? Do you see what's going on in here? Help?




if (!isset($_SESSION) && (isset($move)) )
// geez ... a session time out! RUN!
{
if (isset($_REQUEST))
{
safe_die('You cannot start this script directly');
}
require_once(dirname(__FILE__).'/classes/core/language.php');
$baselang = GetBaseLanguageFromSurveyID($surveyid);
$clang = new limesurvey_lang($baselang);
//A nice exit
sendcacheheaders();
doHeader();

echo templatereplace(file_get_contents("$standardtemplaterootdir/default/startpage.pstpl"));
echo "<center><br />\n"
."\t<font color='RED'><strong>".$clang->gT("ERROR")."</strong></font><br />\n"
."\t".$clang->gT("We are sorry but your session has expired.")."<br />".$clang->gT("Either you have been inactive for too long, you have cookies disabled for your browser, or there were problems with your connection.")."<br />\n"
."\t".sprintf($clang->gT("Please contact %s ( %s ) for further assistance."),$siteadminname,$siteadminemail)."\n"
."</center><br />\n";

echo templatereplace(file_get_contents("$standardtemplaterootdir/default/endpage.pstpl"));
doFooter();
exit;
};
The administrator has disabled public write access.

Re: Invalid token error at end of survey 3 years 2 months ago #61226

  • JBgazzlab
  • JBgazzlab's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hi gwadmin,

I am having a similar issue. I had a 1.8 version of LimeSurvey installed on GoDaddy and recently updated to version 1.9. The errors were so sever and time being an issue in our research study, we created a separate installation of version 1.9 on GoDaddy.

After some manual labor, we were able to reinstate our survey and we too get the error "You need a valid token to participate" but at the beginning of the survey. I send and invitation to participate in the survey and when you click on the survey link in the email, the site tells you the token is invalid.

I've generated several different tokens, sent it to several email address, and even the dummy tokens I create produce this error. The error also occurs when you click on the 'do survey' icon (green wheel) in the token management page...

I need this fixed asap so I'll be doing a lot of digging today. If you were able to fix this, please share! I'll keep you posted on anything I find.

Thanks!
Jacqueline Boccanfuso
Research Associate
Gazzaley Lab, UCSF
The administrator has disabled public write access.

Re: Invalid token error at end of survey 3 years 2 months ago #61227

  • gwadmin
  • gwadmin's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
We were able to resolve the issue, but getting this message at the end I think is a completely different problem than at the beginning.

After further research we found that people received this error if they clicked "Next" on the last question more than once. When we moved to a shared hosting server our performance dropped, and it was taking several seconds for the "Thank you" screen to appear, so they would click "Next" again and get this error. I've already submitted a bug report, and apparently a fix for it is actually already included in 1.91.
The administrator has disabled public write access.

Re: Invalid token error at end of survey 3 years 2 months ago #61229

  • JBgazzlab
  • JBgazzlab's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Thanks for the update! Glad this issue was able to be resolved.

I'll keep at it...
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.121 seconds
Donation Image