View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
11564Bug reportsResponse browsingpublic2016-09-21 16:28
Reporterttenbergen Assigned Toc_schmitz  
PriorityhighSeverityblock 
Status closedResolutionunable to reproduce 
Product Version2.50.x 
Summary11564: Reporting gives PHP error
Description

When trying to do a "View Statistics" with
I get the error posted in "Additional Information" below. We had the same problem in 2.06, was hoping it would be fixed in new version.

The error shows up when output format is HTML, but not when it's PDF.

I can hit back arrow and step back into the menu.

Additional Information

Error screen:
PHP notice

Undefined offset: 2

/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/application/helpers/admin/statistics_helper.php(2593)

2581 //increase counter
2582 $TotalCompleted += $row;
2583
2584 //"no answer" handling
2585 if ($al[0] === "")
2586 {$fname=gT("No answer");}
2587
2588 //"other" handling
2589 //"Answer" means that we show an option to list answer to "other" text field
2590 elseif ($al[0] === gT("Other") || $al[0] === "Answer" || ($outputs['qtype'] === "O" && $al[0] === gT("Comments")) || $outputs['qtype'] === "P")
2591 {
2592 if ($outputs['qtype'] == "P") $sColumnName = $al[2]."comment";
2593 else $sColumnName = $al[2];
2594 $ColumnName_RM[]=$sColumnName;
2595 if ($outputs['qtype']=='O') {
2596 $TotalCompleted -=$row;
2597 }
2598 $fname="$al[1]";
2599 if ($browse===true) $fname .= " <input type='button' class='statisticsbrowsebutton btn btn-default btn-large' value='"
2600 .gT("Browse")."' id='$sColumnName' />";
2601
2602 if ($browse===true && isset($_POST['showtextinline']) && $outputType=='pdf') {
2603 $headPDF2 = array();
2604 $headPDF2[] = array(gT("ID"),gT("Response"));
2605 $tablePDF2 = array();

Stack Trace
#0

/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/application/helpers/admin/statistics_helper.php(4125): 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", ...), "9", "169337X2505X15556", "html", ...)

4120 $outputs=$this->buildOutputList($rt, $language, $surveyid, $outputType, $sql, $sLanguageCode);
4121 $sOutputHTML .= $outputs['statisticsoutput'];
4122 //2. Collect and Display results #######################################################################
4123 if (isset($outputs['alist']) && $outputs['alist']) //Make sure there really is an answerlist, and if so:
4124 {
4125 $display=$this->displayResults($outputs, $results, $rt, $outputType, $surveyid, $sql, $usegraph, $browse, $sLanguageCode);
4126 $sOutputHTML .= $display['statisticsoutput'];
4127 $aStatisticsData = array_merge($aStatisticsData, $display['astatdata']);
4128 } //end if -> collect and display results
4129
4130

#1

/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/application/controllers/admin/statistics.php(482): statistics_helper->generate_html_chartjs_statistics("169337", array("datestampE", "datestampG", "datestampL", "idG", ...), array("datestampE", "datestampG", "datestampL", "idG", ...), 1, ...)

477 $outputType = $_POST['outputtype'];
478
479
480 switch($outputType){
481 case 'html':
482 $statisticsoutput .= $helper->generate_html_chartjs_statistics($surveyid,$summary,$summary,$usegraph,$outputType,'DD',$statlang);
483 break;
484 case 'pdf':
485 $helper->generate_statistics($surveyid,$summary,$summary,$usegraph,$outputType,'I',$statlang);
486 exit;
487 break;

#2
unknown(0): statistics->run("169337", null)
#3
+
/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(statistics, array("169337", null))
#4

/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/application/core/Survey_Common_Action.php(101): CAction->runWithParamsInternal(statistics, ReflectionMethod, array("surveyid" => "169337", "sa" => "index", "iSurveyId" => "169337", "iSurveyID" => "169337"))

096 $oMethod = new ReflectionMethod($this, $sDefault);
097 }
098
099 // We're all good to go, let's execute it
100 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
101 return parent::runWithParamsInternal($this, $oMethod, $params);
102 }
103
104 /*
105
Some functions have different parameters, which are just an alias of the
106 * usual parameters we're getting in the url. This function just populates

#5
+
/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/framework/web/CController.php(308): Survey_Common_Action->runWithParams(array("surveyid" => "169337", "sa" => "index"))
#6
+
/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/framework/web/CController.php(286): CController->runAction(statistics)
#7
+
/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/framework/web/CController.php(265): CController->runActionWithFilters(statistics, array())
#8
+
/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/application/controllers/AdminController.php(165): CController->run("statistics")
#9
+
/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/framework/web/CWebApplication.php(282): AdminController->run("statistics")
#10
+
/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/statistics/sa/index")
#11
+
/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/framework/base/CApplication.php(185): CWebApplication->processRequest()
#12
+
/home/lstesting2/lstesting.cpdtracking.ca/limesurvey/index.php(214): CApplication->run()

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)160817
I will donate to the project if issue is resolvedNo
BrowserFF newest
Database type & version??
Server OS (if known)??
Webserver software & version (if known)??
PHP Version5.4

Users monitoring this issue

There are no users monitoring this issue.

Activities

LouisGac

LouisGac

2016-08-22 12:33

developer   ~40377

Please, could you provide a LSA file, or steps to reproduce?

ttenbergen

ttenbergen

2016-08-26 03:18

reporter   ~40515

When I try to export an LSA file of the survey Firefox just keeps telling me "unknown time remaining - 0 bytes".

Mazi

Mazi

2016-08-31 10:08

updater   ~40591

I can reproduce this issue but it is "only" a PHP notice which usually wouldn't be shown at productive systems but only with debug mode or error reporting enabled.

I do not consider this rather serious so you may want to think about giving this a lower priority.

ttenbergen

ttenbergen

2016-08-31 17:47

reporter   ~40615

How about the failure to export an LSA file?

ttenbergen

ttenbergen

2016-08-31 17:54

reporter   ~40616

Also: Errors are showing even if debug is off. I just tested it because I was pretty sure it was off and we were getting them. Just got
"Internal Server Error
CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause'

An internal error occurred while the Web server was processing your request. Please contact the webmaster to report this problem.

Thank you. "

Confirmed that debug=0

LouisGac

LouisGac

2016-09-05 10:10

developer   ~40677

Well if you can't export, we can bet that the survey is corrupted.

Mazi

Mazi

2016-09-05 10:50

updater   ~40680

Export often fails for large surveys if shared hosting or any hosting with few server resources is used.
Maybe try a smaller survey?!

c_schmitz

c_schmitz

2016-09-08 14:48

administrator   ~40733

The survey is corrupted in some way - either just the response table or the survey in whole.
Without having access to the database it is impossible to determine for us what went wrong.

So if you can give us a dump of your database we could have a look - all data will be treated confidentally, of course.

You could try deactivating the survey and activating it again (import the responses of the archived table afterwards), and see if that fixes your issue.

So, if you can't give us data for debugging then we will have to close this issue. Thank you for your understanding.

ttenbergen

ttenbergen

2016-09-08 22:39

reporter   ~40736

Mazi, when you say large survey, do you mean many questions or many participants?

The way we use Limesurvey is basically with just one survey that has been copied many times. The 20 coordinators copy the master and change email details to their names, and then copy their own surveys after that. We have been doing that for > three years. About every year or when we hit ~1000 surveys we have started to run into problems that have got us to do a clean install, import only the participant list and the master survey, and start again. Just as a background.

I just exported the master survey to .lsa, and while it took a long time to generate a 6kB file, it worked. I will attach that one. I could not test whether it actually causes a stats error because it has no responses.
I also tried a survey with 2 responses... that one is still processing.

ttenbergen

ttenbergen

2016-09-08 23:31

reporter   ~40737

OK, a "real" survey finished exporting to LSA as well now. I am testing the statistics with HTML output format. Not getting the error, but after 5 minutes I am also not getting output. It took a little while (not sure how long I was doing other stuff by then), but I did eventually get output for the PDF version.

c_schmitz

c_schmitz

2016-09-09 09:04

administrator   ~40739

Last edited: 2016-09-09 09:11

Get yourself a free LimeSurvey installation on www.limeservice.com and see if you there have the same problems. To me it sounds like there is something fishy with your server. We have lots of customers having several thousand surveys in their installation without any problems.
So either it is your server or your LimeSurvey setup/database is somehow specific that some rare bug is triggered.

c_schmitz

c_schmitz

2016-09-21 16:28

administrator   ~40895

Closed due to missing feedback.

Issue History

Date Modified Username Field Change
2016-08-20 00:04 ttenbergen New Issue
2016-08-22 12:22 c_schmitz Assigned To => LouisGac
2016-08-22 12:22 c_schmitz Status new => assigned
2016-08-22 12:23 c_schmitz Priority none => high
2016-08-22 12:33 LouisGac Note Added: 40377
2016-08-22 12:33 LouisGac Status assigned => acknowledged
2016-08-24 14:25 c_schmitz Status acknowledged => feedback
2016-08-26 03:18 ttenbergen Note Added: 40515
2016-08-26 03:18 ttenbergen Status feedback => assigned
2016-08-31 10:08 Mazi Note Added: 40591
2016-08-31 17:47 ttenbergen Note Added: 40615
2016-08-31 17:54 ttenbergen Note Added: 40616
2016-09-05 10:10 LouisGac Note Added: 40677
2016-09-05 10:50 Mazi Note Added: 40680
2016-09-08 14:48 c_schmitz Note Added: 40733
2016-09-08 14:48 c_schmitz Assigned To LouisGac => c_schmitz
2016-09-08 14:48 c_schmitz Status assigned => feedback
2016-09-08 22:39 ttenbergen Note Added: 40736
2016-09-08 22:39 ttenbergen Status feedback => assigned
2016-09-08 22:40 ttenbergen File Added: survey_archive_815918 master no responses.lsa
2016-09-08 23:31 ttenbergen Note Added: 40737
2016-09-09 09:04 c_schmitz Note Added: 40739
2016-09-09 09:11 c_schmitz Note Edited: 40739
2016-09-21 16:28 c_schmitz Status assigned => closed
2016-09-21 16:28 c_schmitz Resolution open => unable to reproduce
2016-09-21 16:28 c_schmitz Note Added: 40895