View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06105Bug reportsResponse browsingpublic2012-05-28 15:12
ReporterFred Assigned Toc_schmitz  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version2.00RC1 
Fixed in Version2.00RC2 
Summary06105: Can't View Responses/Statistics on this survey
Description

Trying test survey with variety of question types. Survey works fine in 1.92 on same database. When I try to View Responses, PHP error: undefined variable: row

Seems to crash on array question

Steps To Reproduce

I attached the test survey.
Survey uses tokens
Enter a response
Go to View Responses and it crashes

Additional Information

PHP notice

Undefined variable: row

/Users/fred/Dropbox/MAMP/htdocs/limesurvey/application/helpers/common_helper.php(1873)

1861 {
1862 $iScaleID=$fields['scale_id'];
1863 }
1864 else
1865 {
1866 $iScaleID=0;
1867 }
1868 $result = Answers::model()->getAnswerFromCode($fields['qid'],$sValue,$sLanguage,$iScaleID) or die ("Couldn't get answer type L - getAnswerCode()"); //Checked
1869 foreach($result as $row)
1870 {
1871 $this_answer=$row['answer'];
1872 } // while
1873 $this_answer=$row['answer'];
1874 if ($sValue == "-oth-")
1875 {
1876 $this_answer=$oLanguage->gT("Other");
1877 }
1878 break;
1879 case "|": //File upload
1880 if (substr($sFieldCode, -9) == 'filecount') {
1881 $this_answer = $oLanguage->gT("File count");
1882 } else {
1883 //Show the filename, size, title and comment -- no link!
1884 $files = json_decode($sValue);
1885 $sValue = '';
Stack Trace
Actions
Token
First name
Last name
Email
Completed
Response ID
Start language
Date started
Date last action
IP address
Referrer URL
Do you want to answer some questions?
What is your favorite animal?
What is your favorite animal? (Other)
What are your favorite colors? (Red)
What are your favorite colors? (Green)
What are your favorite colors? (Blue)
What are your favorite colors? (Other)
What was the name of your first pet?
What is your favorite number?
What is your weight, your shoe size, and your IQ? (Weight)
What is your weight, your shoe size, and your IQ? (Shoe Size)
What is your weight, your shoe size, and your IQ? (IQ)
Who were the first three US Presidents? (First)
Who were the first three US Presidents? (Second)
Who were the first three US Presidents? (Third)
Identify the color of each fruit. (Cherry)
Identify the color of each fruit. (Blueberry)

        jackson 

andrew
jackson
fred@gnudle.com
Y
1
en
2012-05-08 13:55:54
2012-05-08 13:57:28
::1
http://localhost:8888/flopsy/stats/index.php?sid=69241&lang=en&token=jackson
Yes [Y]
Horse [H]
Yes [Y]
Maggie
666
150
6
150
Washington
Adams
Jefferson
Red [R]
Blue [B]
#0
– /Users/fred/Dropbox/MAMP/htdocs/limesurvey/application/views/admin/browse/browseallrow_view.php(82): getExtendedAnswer(69241, "69241X33X565cherr", "", Limesurvey_lang)
77 else
78 $browsedatafield = "Y";
79 }
80 else
81 {
82 $browsedatafield = htmlspecialchars(strip_tags(stripJavaScript(getExtendedAnswer($surveyid, $fnames[$i][0], $dtrow[$fnames[$i][0]], $oBrowseLanguage))), ENT_QUOTES);
83 }
84 echo "<td><span>$browsedatafield</span></td>\n";
85 }
86 }
87 ?>
#1

  • /Users/fred/Dropbox/MAMP/htdocs/LimeSurvey/framework/web/CBaseController.php(127): require("/Users/fred/Dropbox/MAMP/htdocs/limesurvey/application/views/adm...")
    #2
  • /Users/fred/Dropbox/MAMP/htdocs/LimeSurvey/framework/web/CBaseController.php(96): CBaseController->renderInternal("/Users/fred/Dropbox/MAMP/htdocs/limesurvey/application/views/adm...", array("iSurveyId" => 69241, "surveyid" => 69241, "clang" => Limesurvey_lang, "imageurl" => "/limesurvey/images", ...), true)
    #3
  • /Users/fred/Dropbox/MAMP/htdocs/LimeSurvey/framework/web/CController.php(870): CBaseController->renderFile("/Users/fred/Dropbox/MAMP/htdocs/limesurvey/application/views/adm...", array("iSurveyId" => 69241, "surveyid" => 69241, "clang" => Limesurvey_lang, "imageurl" => "/limesurvey/images", ...), true)
    #4
  • /Users/fred/Dropbox/MAMP/htdocs/LimeSurvey/framework/web/CController.php(783): CController->renderPartial("/admin/browse/browseallrow_view", array("iSurveyId" => 69241, "surveyid" => 69241, "clang" => Limesurvey_lang, "imageurl" => "/limesurvey/images", ...), true)
    #5
    – /Users/fred/Dropbox/MAMP/htdocs/limesurvey/application/core/Survey_Common_Action.php(268): CController->render("/admin/browse/browseallrow_view", array("iSurveyId" => 69241, "surveyid" => 69241, "clang" => Limesurvey_lang, "imageurl" => "/limesurvey/images", ...))
    263 elseif (is_array($viewUrl))
    264 {
    265 foreach ($viewUrl as $aSubData)
    266 {
    267 $aSubData = array_merge($aData, $aSubData);
    268 Yii::app()->getController()->render($sViewPath . $sViewKey, $aSubData);
    269 }
    270 }
    271 }
    272 else
TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)000000
I will donate to the project if issue is resolvedNo
BrowserChrome, Safari
Database type & versionMySQL 5.5.9
Server OS (if known)Mac OS Lion
Webserver software & version (if known)Apache 2.2.17
PHP Version5.3.6

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-05-17 14:57

administrator   ~18827

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

Fred

Fred

2012-05-17 15:54

reporter   ~18828

Thanks, you guys are fast

c_schmitz

c_schmitz

2012-05-28 15:12

administrator   ~18953

Version 2.00RC2 released.

Related Changesets

LimeSurvey: Yii 48b49808

2012-05-17 05:55:25

c_schmitz

Details Diff
Fixed issue 06105: Can't view responses/statistics on this survey Affected Issues
06105
mod - application/controllers/admin/surveyadmin.php Diff File
mod - application/helpers/admin/import_helper.php Diff File
mod - application/helpers/common_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-05-16 17:39 Fred New Issue
2012-05-16 17:39 Fred File Added: survey_archive_69241.zip
2012-05-17 14:54 c_schmitz Assigned To => c_schmitz
2012-05-17 14:54 c_schmitz Status new => assigned
2012-05-17 14:55 c_schmitz Status assigned => resolved
2012-05-17 14:55 c_schmitz Resolution open => fixed
2012-05-17 14:56 c_schmitz Fixed in Version => 2.00RC2
2012-05-17 14:57 c_schmitz Changeset attached => LimeSurvey Yii 48b49808
2012-05-17 14:57 c_schmitz Note Added: 18827
2012-05-17 15:54 Fred Note Added: 18828
2012-05-28 15:12 c_schmitz Note Added: 18953
2012-05-28 15:12 c_schmitz Status resolved => closed