View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
14086Bug reportsData Entry (non public)public2019-01-18 16:05
Reportermfreund Assigned ToLouisGac 
PrioritynoneSeveritypartial_block 
Status closedResolutionunable to reproduce 
Product Version3.13.x 
Summary14086: Error message after clicking Data Entry
Description

I just clicked the button for the data entry screen and got this message:

PHP warning
Division by zero

/home/lunafr2/public_html/survey/application/views/admin/dataentry/content_view.php(308)

296 case "M": ?>
297 <div class="col-sm-10">
298 <?php
299 if ($deqrow['other'] == "Y") {$meacount++;}
300
301 / This caused a regression in 2.5, BUT: code below ($mearesult->FetchRow())
302
assumes that $mearesult sometimes could be an object,
303 which is never true even in 2.06.
304
/
305 //if ($dcols > 0 && $meacount >= $dcols)
306 if (true)
307 {
308 $width=sprintf("%0d", 100/$dcols);
309 $maxrows=ceil(100*($meacount/$dcols)/100); //Always rounds up to nearest whole number
310 $divider=" </td> <td valign='top' width='$width%' nowrap='nowrap'>";
311 $upto=0; ?>
312 <table class='question'><tr> <td valign='top' width='<?php echo $width; ?>%' nowrap='nowrap'>
313 <?php foreach ($mearesult as $mearow)
314 {
315 if ($upto == $maxrows)
316 {
317 echo $divider;
318 $upto=0;
319 } ?>
320 <input type='checkbox' class='checkboxbtn' name='<?php echo $fieldname.$mearow['title']; ?>' id='answer<?php echo $fieldname.$mearow['title']; ?>' value='Y' />
Stack Trace
#0

  • /home/lunafr2/public_html/survey/framework/web/CBaseController.php(126): require("/home/lunafr2/public_html/survey/application/views/admin/dataent...")
    #1
  • /home/lunafr2/public_html/survey/framework/web/CBaseController.php(95): CBaseController->renderInternal("/home/lunafr2/public_html/survey/application/views/admin/dataent...", array("qidattributes" => array("array_filter" => "", "array_filter_exclude" => "", "array_filter_style" => 0, "assessment_value" => "1", ...), "explanation" => "<tr class ='data-entry-explanation'><td class='data-entry-small-...", "bgc" => "even", "fieldname" => "632979X193X4516", ...), true)
    #2
  • /home/lunafr2/public_html/survey/framework/web/CController.php(872): CBaseController->renderFile("/home/lunafr2/public_html/survey/application/views/admin/dataent...", array("qidattributes" => array("array_filter" => "", "array_filter_exclude" => "", "array_filter_style" => 0, "assessment_value" => "1", ...), "explanation" => "<tr class ='data-entry-explanation'><td class='data-entry-small-...", "bgc" => "even", "fieldname" => "632979X193X4516", ...), true)
    #3
    – /home/lunafr2/public_html/survey/application/controllers/admin/dataentry.php(2096): CController->renderPartial("/admin/dataentry/content_view", array("qidattributes" => array("array_filter" => "", "array_filter_exclude" => "", "array_filter_style" => 0, "assessment_value" => "1", ...), "explanation" => "<tr class ='data-entry-explanation'><td class='data-entry-small-...", "bgc" => "even", "fieldname" => "632979X193X4516", ...), true)
    2091 $cdata['fresult'] = $fresult->readAll();
    2092 break;
    2093 }
    2094
    2095 $cdata['sDataEntryLanguage'] = $sDataEntryLanguage;
    2096 $viewdata = $this->getController()->renderPartial("/admin/dataentry/content_view", $cdata, true);
    2097 $viewdata_em = LimeExpressionManager::ProcessString($viewdata, $deqrow['qid'], null, 1, 1);
    2098 $aDataentryoutput .= $viewdata_em;
    2099 }
    2100 LimeExpressionManager::FinishProcessingGroup();
    2101 }
    #4
    unknown(0): dataentry->view("632979")
    #5
  • /home/lunafr2/public_html/survey/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(dataentry, array("632979"))
    #6
    – /home/lunafr2/public_html/survey/application/core/Survey_Common_Action.php(83): CAction->runWithParamsInternal(dataentry, ReflectionMethod, array("surveyid" => "632979", "sa" => "view", "iSurveyId" => "632979", "iSurveyID" => "632979", ...))
    78 $oMethod = new ReflectionMethod($this, $sDefault);
    79 }
    80
    81 // We're all good to go, let's execute it
    82 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
    83 return parent::runWithParamsInternal($this, $oMethod, $params);
    84 }
    85
    86 /*
    87
    Some functions have different parameters, which are just an alias of the
    88 * usual parameters we're getting in the url. This function just populates
    #7
  • /home/lunafr2/public_html/survey/framework/web/CController.php(308): Survey_Common_Action->runWithParams(array("surveyid" => "632979", "sa" => "view"))
    #8
  • /home/lunafr2/public_html/survey/framework/web/CController.php(286): CController->runAction(dataentry)
    #9
  • /home/lunafr2/public_html/survey/framework/web/CController.php(265): CController->runActionWithFilters(dataentry, array())
    #10
    – /home/lunafr2/public_html/survey/application/controllers/AdminController.php(158): CController->run("dataentry")
    153 $this->redirect(array('/admin/authentication/sa/login'));
    154 }
    155 }
    156 }
    157
    158 return parent::run($action);
    159 }
    160
    161 /*
    162
    Routes all the actions to their respective places
    163 *
    #11
  • /home/lunafr2/public_html/survey/framework/web/CWebApplication.php(282): AdminController->run("dataentry")
    #12
  • /home/lunafr2/public_html/survey/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/dataentry/sa/view")
    #13
  • /home/lunafr2/public_html/survey/framework/base/CApplication.php(185): CWebApplication->processRequest()
    #14
  • /home/lunafr2/public_html/survey/index.php(194): CApplication->run()
    2018-09-20 16:37:01 Apache Yii Framework/1.1.19
Steps To Reproduce

I tried several times and got the error each time.

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)3.14.8+180829
I will donate to the project if issue is resolvedYes
BrowserChrome Version 67.0.3396.99 (Official Build) (64-bit)
Database type & versionMySQL 5.6.39
Server OS (if known)linux
Webserver software & version (if known)Apache Version 2.4.33
PHP Version 5.6.37

Users monitoring this issue

There are no users monitoring this issue.

Activities

LouisGac

LouisGac

2019-01-10 17:42

developer   ~50170

could you please join a lsa file?

Issue History

Date Modified Username Field Change
2018-09-20 18:40 mfreund New Issue
2019-01-10 17:42 LouisGac Assigned To => LouisGac
2019-01-10 17:42 LouisGac Status new => feedback
2019-01-10 17:42 LouisGac Note Added: 50170
2019-01-18 16:05 LouisGac Status feedback => closed
2019-01-18 16:05 LouisGac Resolution open => unable to reproduce