End URL error

More
11 months 2 weeks ago - 11 months 2 weeks ago #158194 by badronald
badronald created the topic: End URL error
I am using Version 2.06lts Build 160417
i have entered a conditional end URL

{if(((gender =='1' AND gender_id == '1') OR version == '1'),' www.nhs2survey.org/limesurvey206/upload/...name={TOKEN:LASTNAME }')}


EDIT: It works fine in Version 1.92+ Build 120919


It is giving me this error:
PHP warning

Header may not contain more than a single header, new line detected

/home/nhs2/public_html/limesurvey206/application/helpers/SurveyRuntimeHelper.php(664)

652 . gT("View the statistics for this survey.")
653 . "</a><br />\n";
654 }
655 //*****************************************
656
657 $_SESSION[$LEMsessid] = true;
658 $_SESSION[$LEMsessid] = $surveyid;
659
660 sendCacheHeaders();
661 if (isset($thissurvey) && $thissurvey == "Y" && $thissurvey)
662 {
663 //Automatically redirect the page to the "url" setting for the survey
664 header("Location: {$thissurvey}");
665 }
666
667 doHeader();
668 echo $content;
669 }
670 $redata = $completed;
671
672 // @todo Remove direct session access.
673 $event = new PluginEvent('afterSurveyComplete');
674 if (isset($_SESSION[$LEMsessid]))
675 {
676 $event->set('responseId', $_SESSION[$LEMsessid]);
Stack Trace
#0
– /home/nhs2/public_html/limesurvey206/application/helpers/SurveyRuntimeHelper.php(664): header("Location: <span class='em-expression em-haveerror'><span title='...")
659
660 sendCacheHeaders();
661 if (isset($thissurvey) && $thissurvey == "Y" && $thissurvey)
662 {
663 //Automatically redirect the page to the "url" setting for the survey
664 header("Location: {$thissurvey}");
665 }
666
667 doHeader();
668 echo $content;
669 }
#1
– /home/nhs2/public_html/limesurvey206/application/controllers/survey/index.php(580): SurveyRuntimeHelper->run("69477", array("surveyid" => "69477", "thissurvey" => array("template" => "citronadeNHS3MOD9", "language" => "en", "sid" => "69477", "owner_id" => "3", ...), "thisstep" => "2", "clienttoken" => "qLktF0yH", ...))
575 //Send local variables to the appropriate survey type
576 unset($redata);
577 $redata = compact(array_keys(get_defined_vars()));
578 Yii::import('application.helpers.SurveyRuntimeHelper');
579 $tmp = new SurveyRuntimeHelper();
580 $tmp->run($surveyid,$redata);
581
582 if (isset($_POST) || isset($flashmessage))
583 {
584 echo "<script type='text/javascript'> $(document).ready( function() { alert('".gT("Your responses were successfully saved.","js")."');}) </script>";
585 }
#2
– /home/nhs2/public_html/limesurvey206/application/controllers/survey/index.php(46): index->action()
41 App()->getClientScript()->render($buffer);
42 App()->getClientScript()->reset();
43 return $buffer;
44 });
45 ob_implicit_flush(false);
46 $this->action();
47 ob_flush();
48 }
49
50 function action()
51 {
#3
+ /home/nhs2/public_html/limesurvey206/framework/web/actions/CAction.php(76): index->run()
#4
+ /home/nhs2/public_html/limesurvey206/framework/web/CController.php(308): CAction->runWithParams(array("sid" => "69477"))
#5
+ /home/nhs2/public_html/limesurvey206/framework/web/CController.php(286): CController->runAction(index)
#6
+ /home/nhs2/public_html/limesurvey206/framework/web/CController.php(265): CController->runActionWithFilters(index, array())
#7
+ /home/nhs2/public_html/limesurvey206/framework/web/CWebApplication.php(282): CController->run("index")
#8
+ /home/nhs2/public_html/limesurvey206/framework/web/CWebApplication.php(141): CWebApplication->runController("survey/index/sid/69477")
#9
+ /home/nhs2/public_html/limesurvey206/framework/base/CApplication.php(184): CWebApplication->processRequest()
#10
+ /home/nhs2/public_html/limesurvey206/index.php(211): CApplication->run()
Last Edit: 11 months 2 weeks ago by badronald. Reason: more information

Please Log in or Create an account to join the conversation.

More
11 months 2 weeks ago - 11 months 2 weeks ago #158196 by DenisChenu
DenisChenu replied the topic: End URL error
1. You have 2 error in your expression : if need if true AND if false AND you don't need 2 times {
{if(gender =='1'  OR version == '1','www.nhs2survey.org/limesurvey206/upload/...name='+TOKEN:LASTNAME,'')}

2. End url EM issue are hard to fix and find : better add an Equation question (code EndUrl for example)type and put your expression here; and put in EndUrl {EndUrl.NAOK}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 11 months 2 weeks ago by DenisChenu.

Please Log in or Create an account to join the conversation.

More
11 months 2 weeks ago #158197 by badronald
badronald replied the topic: End URL error
The error was in the Expression part, one of the variable names was incorrect.

Please Log in or Create an account to join the conversation.

More
11 months 2 weeks ago #158210 by DenisChenu
DenisChenu replied the topic: End URL error
Then it's a third error. And again : test your expression before put in end url with redirect … maybe it's fixed now : if expression have error => don't redirect.
Else : remind to use "Survey logic file" when you have an error

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!