LimeSurvey issue tracker
Registration

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
06192Bug reports[All Projects] Survey takingpublic2012-06-11 10:212012-07-20 08:41
ReporterMazi 
Assigned Tojcleeland 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
Product Version2.00RC2 
Target Version2.00RC3Fixed in Version 
Summary06192: PHP notice "Undefined variable: clienttoken" when using end URL
DescriptionWhen 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 */
Steps To ReproduceImport, activate and run the attached survey.
I will donate to the project if issue is resolved within 48 hrsNo
LimeSurvey build number120608
BrowserFirefox 12
Database & DB-VersionMySQL 5
Operating System (Server)Win 7
Webserver software & versionApache 2.2
PHP Version5.3.1
Attached Files? file icon limesurvey_survey_916566.lss [^] (16,101 bytes) 2012-06-11 10:21

- Relationships

-  Notes
User avatar (19855)
jcleeland (developer)
2012-07-20 08:40

Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9057 [^]
User avatar (19856)
jcleeland (developer)
2012-07-20 08:41

Fixed 20120702

- Related Changesets
LimeSurvey: Yii e4887ef4
Timestamp: 2012-07-19 23:41:00
Author: jcleeland
Committer: jcleeland
Details ] Diff ]
Fixed issue 06192 - PHP notice "undefined variable" when using end URL
mod - application/helpers/SurveyRuntimeHelper.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-06-11 10:21 Mazi New Issue
2012-06-11 10:21 Mazi Status new => assigned
2012-06-11 10:21 Mazi Assigned To => magiclko
2012-06-11 10:21 Mazi File Added: limesurvey_survey_916566.lss
2012-07-20 08:35 jcleeland Assigned To magiclko => jcleeland
2012-07-20 08:40 jcleeland Changeset attached => LimeSurvey Yii e4887ef4
2012-07-20 08:40 jcleeland Note Added: 19855
2012-07-20 08:40 jcleeland Resolution open => fixed
2012-07-20 08:41 jcleeland Note Added: 19856
2012-07-20 08:41 jcleeland Status assigned => closed


Copyright © 2000 - 2013 MantisBT Team
Powered by Mantis Bugtracker