When setting a survey to automatically load the end URL, I get the following error message at the end of an activated survey:
PHP notice
Undefined variable: clienttoken
C:\xampp\htdocs\git\dev\LimeSurvey\application\helpers\SurveyRuntimeHelper.php(489)
477
478 $_SESSION[$LEMsessid]['finished'] = true;
479 $_SESSION[$LEMsessid]['sid'] = $surveyid;
480
481 sendCacheHeaders();
482 if (isset($thissurvey['autoredirect']) && $thissurvey['autoredirect'] == "Y" && $thissurvey['surveyls_url'])
483 {
484 //Automatically redirect the page to the "url" setting for the survey
485
486 $url = passthruReplace($thissurvey['surveyls_url'], $thissurvey);
487 $url = templatereplace($url); // TODO - check safety of this - provides access to any replacement value
488 $url = str_replace("{SAVEDID}", $saved_id, $url); // to activate the SAVEDID in the END URL
489 $url = str_replace("{TOKEN}", $clienttoken, $url); // to activate the TOKEN in the END URL
490 $url = str_replace("{SID}", $surveyid, $url); // to activate the SID in the END URL
491 $url = str_replace("{LANG}", $clang->getlangcode(), $url); // to activate the LANG in the END URL
492 header("Location: {$url}");
493 }
494
495
496 //if($thissurvey['printanswers'] != 'Y' && $thissurvey['usecookie'] != 'Y' && $tokensexist !=1)
497 if ($thissurvey['printanswers'] != 'Y')
498 {
499 killSurveySession($surveyid);
500 }
501
Stack Trace
#0
–
C:\xampp\htdocs\git\dev\LimeSurvey\application\controllers\survey\index.php(675): SurveyRuntimeHelper->run("916566", array("surveyid" => "916566", "thistpl" => "C:\xampp\htdocs\git\dev\LimeSurvey\templates/default", "totalquestions" => null, "thissurvey" => array("surveyls_survey_id" => "916566", "surveyls_language" => "de", "surveyls_title" => "Ranking Bug Test", "surveyls_description" => "", ...), ...))
670 //Send local variables to the appropriate survey type
671 unset($redata);
672 $redata = compact(array_keys(get_defined_vars()));
673 Yii::import('application.helpers.SurveyRuntimeHelper');
674 $tmp = new SurveyRuntimeHelper();
675 $tmp->run($surveyid,$redata);
676
677 if (isset($_POST['saveall']) || isset($flashmessage))
678 {
679 echo "<script type='text/javascript'> $(document).ready( function() { alert('".$clang->gT("Your responses were successfully saved.","js")."');}) </script>";
680 }
#1
–
C:\xampp\htdocs\git\dev\LimeSurvey\application\controllers\survey\index.php(18): index->action()
13
14 class index extends CAction {
15
16 public function run()
17 {
18 $this->action();
19 }
20
21 function action()
22 {
23 global $surveyid, $thistpl, $totalquestions;
#2
+
C:\xampp\htdocs\git\dev\LimeSurvey\framework\web\actions\CAction.php(75): index->run()
#3
+
C:\xampp\htdocs\git\dev\LimeSurvey\framework\web\CController.php(309): CAction->runWithParams(array())
#4
+
C:\xampp\htdocs\git\dev\LimeSurvey\framework\web\CController.php(287): CController->runAction(index)
#5
+
C:\xampp\htdocs\git\dev\LimeSurvey\framework\web\CController.php(266): CController->runActionWithFilters(index, array())
#6
+
C:\xampp\htdocs\git\dev\LimeSurvey\framework\web\CWebApplication.php(276): CController->run("index")
#7
+
C:\xampp\htdocs\git\dev\LimeSurvey\framework\web\CWebApplication.php(135): CWebApplication->runController("survey/index")
#8
+
C:\xampp\htdocs\git\dev\LimeSurvey\framework\base\CApplication.php(162): CWebApplication->processRequest()
#9
–
C:\xampp\htdocs\git\dev\LimeSurvey\index.php(171): CApplication->run()
166
167 /
168 require_once BASEPATH . 'yii' . EXT;
169 require_once APPPATH . 'core/LSYii_Application' . EXT;
170
171 Yii::createApplication('LSYii_Application', APPPATH . 'config/config' . EXT)->run();
172
173 / End of file index.php /
174 / Location: ./index.php / |