View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
09618Bug reportsOtherpublic2015-05-12 09:35
Reporteredreyfus Assigned Toc_schmitz  
PriorityurgentSeverityblock 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.06+ 
Summary09618: Installed with nginx, there is random bugs
Description

PHP notice

Undefined variable: qanda

/usr/share/nginx/html/application/helpers/SurveyRuntimeHelper.php(1037)

1025 echo ">\n";
1026 echo templatereplace(file_get_contents($sTemplatePath."startgroup.pstpl"), array(), $redata);
1027 echo "\n";
1028
1029 if (!$previewquestion)
1030 {
1031 echo templatereplace(file_get_contents($sTemplatePath."groupdescription.pstpl"), array(), $redata);
1032 }
1033 echo "\n";
1034
1035 echo "\n\n<!-- PRESENT THE QUESTIONS -->\n";
1036
1037 foreach ($qanda as $qa) // one entry per QID
1038 {
1039 // Test if finalgroup is in this qid (for all in one survey, else we do only qanda for needed question (in one by one or group by goup)
1040 if ($gid != $qa['finalgroup']) {
1041 continue;
1042 }
1043 $qid = $qa[4];
1044 $qinfo = LimeExpressionManager::GetQuestionStatus($qid);
1045 $lastgrouparray = explode("X", $qa[7]);
1046 $lastgroup = $lastgrouparray[0] . "X" . $lastgrouparray[1]; // id of the last group, derived from question id
1047 $lastanswer = $qa[7];
1048
1049 $q_class = getQuestionClass($qinfo['info']['type']);
Stack Trace
#0
– /usr/share/nginx/html/application/controllers/survey/index.php(579): SurveyRuntimeHelper->run("281134", array("surveyid" => "281134", "thissurvey" => array("sid" => "281134", "owner_id" => "1", "admin" => "Guilhem SAVY", "active" => "N", ...), "thisstep" => null, "tokensexist" => 0, ...))
574 //Send local variables to the appropriate survey type
575 unset($redata);
576 $redata = compact(array_keys(get_defined_vars()));
577 Yii::import('application.helpers.SurveyRuntimeHelper');
578 $tmp = new SurveyRuntimeHelper();
579 $tmp->run($surveyid,$redata);
580
581 if (isset($_POST['saveall']) || isset($flashmessage))
582 {
583 echo "<script type='text/javascript'> $(document).ready( function() { alert('".$clang->gT("Your responses were successfully saved.","js")."');}) </script>";
584 }
#1
– /usr/share/nginx/html/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 {
#2

  • /usr/share/nginx/html/framework/web/actions/CAction.php(76): index->run()
    #3
  • /usr/share/nginx/html/framework/web/CController.php(308): CAction->runWithParams(array("q" => "/survey/index/action/previewgroup/sid/281134/gid/4", "action" => "previewgroup", "sid" => "281134", "gid" => "4"))
    #4
  • /usr/share/nginx/html/framework/web/CController.php(286): CController->runAction(index)
    #5
  • /usr/share/nginx/html/framework/web/CController.php(265): CController->runActionWithFilters(index, array())
    #6
  • /usr/share/nginx/html/framework/web/CWebApplication.php(282): CController->run("index")
    #7
  • /usr/share/nginx/html/framework/web/CWebApplication.php(141): CWebApplication->runController("survey/index/action/previewgroup/sid/281134/gid/4")
    #8
  • /usr/share/nginx/html/framework/base/CApplication.php(180): CWebApplication->processRequest()
    #9
    – /usr/share/nginx/html/index.php(200): CApplication->run()
    195 die (sprintf('%s should be writable by the webserver (755 or 775).', $runtimePath));
    196 }
    197 }
    198
    199
    200 Yii::createApplication('LSYii_Application', $config)->run();
    201
    202 / End of file index.php /
    203 / Location: ./index.php /
Steps To Reproduce

Create a survey, create answers, click on view answers

TagsNo tags attached.
Bug heat14
Complete LimeSurvey version number (& build)last one
I will donate to the project if issue is resolvedNo
Browser
Database type & versionj'en sais rien
Server OS (if known)Ubuntu
Webserver software & version (if known)Nginx
PHP Version5

Relationships

has duplicate 09437 closedc_schmitz Empty question groups will affect the display of subsequent groups. 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2015-05-05 17:08

developer   ~32087

With all survey ? Are you sure you have question in all group ?

c_schmitz

c_schmitz

2015-05-06 08:38

administrator   ~32088

Please attach a sample survey - when do you get this exactly?

edreyfus

edreyfus

2015-05-06 10:19

reporter   ~32094

Are you sure you have question in all group ?:
Yes that was the problem. We manage to use lime survey, but the bug does not occur with apache/same database, the error is handled correctly in apache..

edreyfus

edreyfus

2015-05-06 10:20

reporter   ~32095

I'll see if we still have the survey

c_schmitz

c_schmitz

2015-05-07 13:37

administrator   ~32105

Fix committed to 2.06 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=15132

c_schmitz

c_schmitz

2015-05-11 10:36

administrator   ~32164

Version 2.06RC2 Build 150511 released

Related Changesets

LimeSurvey: 2.06 f714ce12

2015-05-07 11:37:01

c_schmitz

Details Diff
Fixed issue 09618: System error when starting a survey having an empty question group Affected Issues
09618
mod - application/helpers/frontend_helper.php Diff File

Issue History

Date Modified Username Field Change
2015-04-30 15:57 edreyfus New Issue
2015-05-05 17:08 DenisChenu Note Added: 32087
2015-05-06 08:38 c_schmitz Note Added: 32088
2015-05-06 08:38 c_schmitz Assigned To => c_schmitz
2015-05-06 08:38 c_schmitz Status new => feedback
2015-05-06 10:19 edreyfus Note Added: 32094
2015-05-06 10:19 edreyfus Status feedback => assigned
2015-05-06 10:20 edreyfus Note Added: 32095
2015-05-07 13:37 c_schmitz Changeset attached => LimeSurvey 2.06 f714ce12
2015-05-07 13:37 c_schmitz Note Added: 32105
2015-05-07 13:37 c_schmitz Resolution open => fixed
2015-05-07 13:37 c_schmitz Status assigned => resolved
2015-05-07 13:37 c_schmitz Fixed in Version => 2.06+
2015-05-07 13:50 DenisChenu Relationship added related to 09437
2015-05-11 10:36 c_schmitz Note Added: 32164
2015-05-11 10:36 c_schmitz Status resolved => closed
2015-05-12 09:35 DenisChenu Relationship replaced has duplicate 09437