Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

End URL error

More
7 years 11 months ago - 7 years 11 months ago #158194 by badronald
End URL error was created by badronald
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: 7 years 11 months ago by badronald. Reason: more information
The topic has been locked.
More
7 years 11 months ago - 7 years 11 months ago #158196 by DenisChenu
Replied by DenisChenu on 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 {
Code:
{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 support - Plugins, theme and development .
I don't answer to private message.
Last edit: 7 years 11 months ago by DenisChenu.
The topic has been locked.
More
7 years 11 months ago #158197 by badronald
Replied by badronald on topic End URL error
The error was in the Expression part, one of the variable names was incorrect.
The topic has been locked.
More
7 years 11 months ago #158210 by DenisChenu
Replied by DenisChenu on 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose