View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 09982 | Bug reports | Statistics | public | 2015-10-20 16:55 | 2016-07-14 15:39 |
| Reporter | ttenbergen | Assigned To | c_schmitz | ||
| Priority | normal | Severity | partial_block | ||
| Status | closed | Resolution | won't fix | ||
| Product Version | 2.06+ | ||||
| Summary | 09982: Getting Error "PHP notice Undefined offset: 2 ..." when trying to generate survey stats | ||||
| Description | When I try to generate stats for any surveys (tested 3 of 700) I get error "PHP notice Undefined offset: 2 ". Debug output is in attached file. | ||||
| Steps To Reproduce | Open survey, click "responses and statistics", click "get statistics from these responses", check "view summary of all available fields" (no error without that checkbox), click "view statistics". | ||||
| Additional Information | We are having ongoing problems and I think our database is corrupted, but it still isn't a graceful fail. | ||||
| Tags | No tags attached. | ||||
| Attached Files | PHP notice stats Undefined offset 2.htm (9,718 bytes)
PHP notice
Undefined offset: 2
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/application/helpers/admin/statistics_helper.php(1817)
1805 //increase counter
1806 $TotalCompleted += $row;
1807
1808 //"no answer" handling
1809 if ($al[0] === "")
1810 {$fname=gT("No answer");}
1811
1812 //"other" handling
1813 //"Answer" means that we show an option to list answer to "other" text field
1814 elseif ($al[0] === gT("Other") || $al[0] === "Answer" || ($outputs['qtype'] === "O" && $al[0] === gT("Comments")) || $outputs['qtype'] === "P")
1815 {
1816 if ($outputs['qtype'] == "P") $sColumnName = $al[2]."comment";
1817 else $sColumnName = $al[2];
1818 $ColumnName_RM[]=$sColumnName;
1819 if ($outputs['qtype']=='O') {
1820 $TotalCompleted -=$row;
1821 }
1822 $fname="$al[1]";
1823 if ($browse===true) $fname .= " <input type='button' class='statisticsbrowsebutton' value='"
1824 .gT("Browse")."' id='$sColumnName' />";
1825
1826 if ($browse===true && isset($_POST['showtextinline']) && $outputType=='pdf') {
1827 $headPDF2 = array();
1828 $headPDF2[] = array(gT("ID"),gT("Response"));
1829 $tablePDF2 = array();
Stack Trace
#0
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/application/helpers/admin/statistics_helper.php(3136):
*statistics_helper*->*displayResults*(array("alist" =>
array(array("FPGP", "FP/GP"), array("Spec", "Specialist"), array("Res",
"Resident"), array("Stdnt", "Student"), ...), "qtitle" => "Q0001",
"qquestion" => "Type of listener", "qtype" => "O", ...), "10",
"124812X3397X21402", "html", ...)
3131 $outputs=$this->buildOutputList($rt, $language, $surveyid, $outputType, $sql, $sLanguageCode);
3132 $sOutputHTML .= $outputs['statisticsoutput'];
3133 //2. Collect and Display results #######################################################################
3134 if (isset($outputs['alist']) && $outputs['alist']) //Make sure there really is an answerlist, and if so:
3135 {
3136 $display=$this->displayResults($outputs, $results, $rt, $outputType, $surveyid, $sql, $usegraph, $browse, $sLanguageCode);
3137 $sOutputHTML .= $display['statisticsoutput'];
3138 $aStatisticsData = array_merge($aStatisticsData, $display['astatdata']);
3139 } //end if -> collect and display results
3140
3141
#1
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/application/controllers/admin/statistics.php(463):
*statistics_helper*->*generate_statistics*("124812", array("idG", "idL",
"datestampE", "datestampG", ...), array("idG", "idL", "datestampE",
"datestampG", ...), 0, ...)
458 $outputType = $_POST['outputtype'];
459
460 $helper = new statistics_helper();
461 switch($outputType){
462 case 'html':
463 $statisticsoutput .= $helper->generate_statistics($surveyid,$summary,$summary,$usegraph,$outputType,'DD',$statlang);
464 break;
465 case 'pdf':
466 $helper->generate_statistics($surveyid,$summary,$summary,$usegraph,$outputType,'I',$statlang);
467 exit;
468 break;
#2
unknown(0): *statistics*->*run*("124812", null)
#3
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/framework/web/actions/CAction.php(108):
*ReflectionMethod*->*invokeArgs*(statistics, array("124812", null))
103 elseif($param->isDefaultValueAvailable())
104 $ps[]=$param->getDefaultValue();
105 else
106 return false;
107 }
108 $method->invokeArgs($object,$ps);
109 return true;
110 }
111 }
#4
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/application/core/Survey_Common_Action.php(99):
*CAction*->*runWithParamsInternal*(statistics, ReflectionMethod,
array("surveyid" => "124812", "sa" => "index", "iSurveyId" => "124812",
"iSurveyID" => "124812"))
094 $oMethod = new ReflectionMethod($this, $sDefault);
095 }
096
097 // We're all good to go, let's execute it
098 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
099 return parent::runWithParamsInternal($this, $oMethod, $params);
100 }
101
102 /**
103 * Some functions have different parameters, which are just an alias of the
104 * usual parameters we're getting in the url. This function just populates
#5
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/framework/web/CController.php(308):
*Survey_Common_Action*->*runWithParams*(array("surveyid" => "124812",
"sa" => "index"))
303 {
304 $priorAction=$this->_action;
305 $this->_action=$action;
306 if($this->beforeAction($action))
307 {
308 if($action->runWithParams($this->getActionParams())===false)
309 $this->invalidActionParams($action);
310 else
311 $this->afterAction($action);
312 }
313 $this->_action=$priorAction;
#6
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/framework/web/CController.php(286):
*CController*->*runAction*(statistics)
281 * @see runAction
282 */
283 public function runActionWithFilters($action,$filters)
284 {
285 if(empty($filters))
286 $this->runAction($action);
287 else
288 {
289 $priorAction=$this->_action;
290 $this->_action=$action;
291 CFilterChain::create($this,$action,$filters)->run();
#7
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/framework/web/CController.php(265):
*CController*->*runActionWithFilters*(statistics, array())
260 {
261 if(($parent=$this->getModule())===null)
262 $parent=Yii::app();
263 if($parent->beforeControllerAction($this,$action))
264 {
265 $this->runActionWithFilters($action,$this->filters());
266 $parent->afterControllerAction($this,$action);
267 }
268 }
269 else
270 $this->missingAction($actionID);
#8
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/application/controllers/AdminController.php(164):
*CController*->*run*("statistics")
159 $this->redirect(array('/admin/authentication/sa/login'));
160 }
161
162 }
163
164 return parent::run($action);
165 }
166
167 /**
168 * Routes all the actions to their respective places
169 *
#9
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/framework/web/CWebApplication.php(282):
*AdminController*->*run*("statistics")
277 {
278 list($controller,$actionID)=$ca;
279 $oldController=$this->_controller;
280 $this->_controller=$controller;
281 $controller->init();
282 $controller->run($actionID);
283 $this->_controller=$oldController;
284 }
285 else
286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
287 array('{route}'=>$route===''?$this->defaultController:$route)));
#10
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/framework/web/CWebApplication.php(141):
*CWebApplication*->*runController*("admin/statistics/sa/index")
136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
137 $_GET[$name]=$value;
138 }
139 else
140 $route=$this->getUrlManager()->parseUrl($this->getRequest());
141 $this->runController($route);
142 }
143
144 /**
145 * Registers the core application components.
146 * This method overrides the parent implementation by registering additional core components.
#11
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/framework/base/CApplication.php(184):
*CWebApplication*->*processRequest*()
179 public function run()
180 {
181 if($this->hasEventHandler('onBeginRequest'))
182 $this->onBeginRequest(new CEvent($this));
183 register_shutdown_function(array($this,'end'),0,false);
184 $this->processRequest();
185 if($this->hasEventHandler('onEndRequest'))
186 $this->onEndRequest(new CEvent($this));
187 }
188
189 /**
#12
+
–
/home/cpdtrack/domains/cpdtracking.ca/public_html/pollsurvey/index.php(211):
*CApplication*->*run*()
206 die (sprintf('%s should be writable by the webserver (766 or 776).', $runtimePath));
207 }
208 }
209
210 Yii::$enableIncludePath = false;
211 Yii::createApplication('LSYii_Application', $config)->run();
212
213 /* End of file index.php */
214 /* Location: ./index.php */
2015-10-20 09:46:55 Apache/2 Yii Framework
<http://www.yiiframework.com/>/1.1.15
| ||||
| Bug heat | 8 | ||||
| Complete LimeSurvey version number (& build) | Version 2.06+ Build 150930 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | Firefox | ||||
| Database type & version | MySQL Server version: 5.6.22-cll-lve - MySQL Community Server (GPL) | ||||
| Server OS (if known) | Linux | ||||
| Webserver software & version (if known) | Apache 2.4.12 | ||||
| PHP Version | PHP version: 5.5.25 | ||||
|
This happens also when check "view summary of all available fields" is unchecked, but the first question is chosen to be included. If the first question is omitted, the rest will display without this error. |
|
|
Is this still a problem in latest 2.06lts version? If yes, please attach your survey. |
|
|
Yes this is still a problem. Not sure about 2.06lts, we are running 2.06+ Build 151215. Is it a .lss file you are asking for? |
|
|
I am sorry but we are not supporting the old 2.06 anymore. |
|
|
We are hoping to update to 2.5 directly later this summer. Last time we tried to update our current version things blew up so the version is locked at our end. Do you have reason to believe that changes between 2.06 and lts have fixed this? If not you might still want to tell me if it was an lss file or what you were looking for. Or, close the ticket since I can't give you what you are asking for. |
|
|
I rewrote the statistic rendering for 2.5, fixing a lot of bugs at the same time. |
|
|
we will not fix statistics in 2.06 |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-10-20 16:55 | ttenbergen | New Issue | |
| 2015-10-20 16:55 | ttenbergen | File Added: PHP notice stats Undefined offset 2.htm | |
| 2015-10-21 02:26 | ttenbergen | Note Added: 33402 | |
| 2016-06-14 13:06 | ollehar | Note Added: 39540 | |
| 2016-06-14 13:06 | ollehar | Assigned To | => ollehar |
| 2016-06-14 13:06 | ollehar | Status | new => feedback |
| 2016-06-16 16:19 | ttenbergen | Note Added: 39632 | |
| 2016-06-16 16:19 | ttenbergen | Status | feedback => assigned |
| 2016-06-17 08:52 | c_schmitz | Note Added: 39651 | |
| 2016-06-17 08:52 | c_schmitz | Assigned To | ollehar => c_schmitz |
| 2016-06-17 08:52 | c_schmitz | Status | assigned => feedback |
| 2016-06-20 22:32 | ttenbergen | Note Added: 39753 | |
| 2016-06-20 22:32 | ttenbergen | Status | feedback => assigned |
| 2016-06-21 10:22 |
|
Note Added: 39756 | |
| 2016-07-14 15:39 |
|
Note Added: 39874 | |
| 2016-07-14 15:39 |
|
Status | assigned => closed |
| 2016-07-14 15:39 |
|
Resolution | open => won't fix |