View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
08888Bug reportsInstallationpublic2014-03-21 16:18
Reporteruser11071Assigned Toc_schmitz  
PriorityhighSeveritycrash 
Status closedResolutionunable to reproduce 
Product Version2.05+ 
Summary08888: Property "SurveyLanguageSetting.surveyls_attributecaptions" is not defined.
Description

I am about to upgrade from 1.91 to 2.05+. The step from 1.91 to 1.92+ works fine as I can see. After this I upgraded to 2.05+. Database migration runs without any problem and I can easy login. But after login and selecting a survey from drop down, I get the error Property "SurveyLanguageSetting.surveyls_attributecaptions" is not defined.

As I thought, data migration didn't worked, I checked the table, but "SELECT surveyls_attributecaptions FROM survey.lime_surveys_languagesettings;" returns an entry "[]" for each row, so the attribute is defined on the database. If i comment out the line 1381 in common_helper.php:

$thissurvey['attributecaptions'] = $result->attributeCaptions;

every things seems to work fine. Is This line needed?

Additional Information

CException

Property "SurveyLanguageSetting.surveyls_attributecaptions" is not defined.

/Users/markus/wokspace/laufbahndiagnostik/survey/framework/db/ar/CActiveRecord.php(145)

133 */
134 public function get($name)
135 {
136 if(isset($this->_attributes[$name]))
137 return $this->_attributes[$name];
138 elseif(isset($this->getMetaData()->columns[$name]))
139 return null;
140 elseif(isset($this->_related[$name]))
141 return $this->_related[$name];
142 elseif(isset($this->getMetaData()->relations[$name]))
143 return $this->getRelated($name);
144 else
145 return parent::
get($name);
146 }
147
148 /*
149
PHP setter magic method.
150 This method is overridden so that AR attributes can be accessed like properties.
151
@param string $name property name
152 @param mixed $value property value
153
/
154 public function __set($name,$value)
155 {
156 if($this->setAttribute($name,$value)===false)
157 {
Stack Trace
#0

  • /Users/markus/wokspace/laufbahndiagnostik/survey/framework/db/ar/CActiveRecord.php(145): CComponent->__get("surveyls_attributecaptions")
    #1
    – /Users/markus/wokspace/laufbahndiagnostik/survey/application/models/SurveyLanguageSetting.php(155): CActiveRecord->__get("surveyls_attributecaptions")
    150 @access public
    151
    @return array
    152 */
    153 public function getAttributeCaptions()
    154 {
    155 $captions = @json_decode($this->surveyls_attributecaptions,true);
    156 return $captions !== false ? $captions : array();
    157 }
    158
    159 function getAllRecords($condition=FALSE, $return_query = TRUE)
    160 {
    #2
  • /Users/markus/wokspace/laufbahndiagnostik/survey/framework/base/CComponent.php(111): SurveyLanguageSetting->getAttributeCaptions()
    #3
  • /Users/markus/wokspace/laufbahndiagnostik/survey/framework/db/ar/CActiveRecord.php(145): CComponent->__get("attributeCaptions")
    #4
    – /Users/markus/wokspace/laufbahndiagnostik/survey/application/helpers/common_helper.php(1381): CActiveRecord->__get("attributeCaptions")
    1376 $thissurvey['email_confirm_subj']=$thissurvey['surveyls_email_confirm_subj'];
    1377 $thissurvey['email_confirm']=$thissurvey['surveyls_email_confirm'];
    1378 $thissurvey['email_register_subj']=$thissurvey['surveyls_email_register_subj'];
    1379 $thissurvey['email_register']=$thissurvey['surveyls_email_register'];
    1380 $thissurvey['attributedescriptions'] = $result->survey->tokenAttributes;
    1381 $thissurvey['attributecaptions'] = $result->attributeCaptions;
    1382 if (!isset($thissurvey['adminname'])) {$thissurvey['adminname']=Yii::app()->getConfig('siteadminemail');}
    1383 if (!isset($thissurvey['adminemail'])) {$thissurvey['adminemail']=Yii::app()->getConfig('siteadminname');}
    1384 if (!isset($thissurvey['urldescrip']) || $thissurvey['urldescrip'] == '' ) {$thissurvey['urldescrip']=$thissurvey['surveyls_url'];}
    1385
    1386 $staticSurveyInfo[$surveyid][$languagecode]=$thissurvey;
    #5
    – /Users/markus/wokspace/laufbahndiagnostik/survey/application/models/Permission.php(341): getSurveyInfo("23118")
    336 else return false;
    337 }
    338
    339 if ($iEntityID>0 && $sEntityName=='survey')
    340 {
    341 $aSurveyInfo=getSurveyInfo($iEntityID);// OR find but then don't use $static
    342 if (!$aSurveyInfo) return false;
    343 // If you own a survey you have access to the whole survey
    344 if ($iUserID==$aSurveyInfo['owner_id']) return true;
    345 }
    346
    #6
  • /Users/markus/wokspace/laufbahndiagnostik/survey/application/models/Permission.php(404): Permission->hasPermission("23118", "survey", "survey", "read", ...)
    #7
  • /Users/markus/wokspace/laufbahndiagnostik/survey/application/core/Survey_Common_Action.php(73): Permission->hasSurveyPermission("23118", "survey", "read")
    #8
  • /Users/markus/wokspace/laufbahndiagnostik/survey/framework/web/CController.php(308): Survey_Common_Action->runWithParams(array("r" => "admin/survey/sa/view/surveyid/23118", "sa" => "view", "surveyid" => "23118"))
    #9
  • /Users/markus/wokspace/laufbahndiagnostik/survey/framework/web/CController.php(286): CController->runAction(SurveyAdmin)
    #10
  • /Users/markus/wokspace/laufbahndiagnostik/survey/framework/web/CController.php(265): CController->runActionWithFilters(SurveyAdmin, array())
    #11
  • /Users/markus/wokspace/laufbahndiagnostik/survey/application/controllers/AdminController.php(169): CController->run("survey")
    #12
  • /Users/markus/wokspace/laufbahndiagnostik/survey/framework/web/CWebApplication.php(282): AdminController->run("survey")
    #13
  • /Users/markus/wokspace/laufbahndiagnostik/survey/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/survey/sa/view/surveyid/23118")
    #14
  • /Users/markus/wokspace/laufbahndiagnostik/survey/framework/base/CApplication.php(180): CWebApplication->processRequest()
    #15
  • /Users/markus/wokspace/laufbahndiagnostik/survey/index.php(200): CApplication->run()
    2014-03-21 09:00:17 PHP 5.4.24 Development Server Yii Framework/1.1.14
TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)Version 2.05+ Build 140320
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql 5.6.16
Server OS (if known)Mac OS X 10.9
Webserver software & version (if known)PHP 5.4.24 Development Server
PHP Version5.4.24

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2014-03-21 11:55

administrator   ~29481

Try to clear the model cache in limesurvey\tmp\runtime\cache

user11071

2014-03-21 16:01

  ~29495

Sounds logical to me. Thanks, I didn't have to clear it, but I guess it was this problem.

c_schmitz

c_schmitz

2014-03-21 16:18

administrator   ~29497

Don't comment out that line. You will get all kind of problems.

Issue History

Date Modified Username Field Change
2014-03-21 10:12 user11071 New Issue
2014-03-21 11:55 c_schmitz Note Added: 29481
2014-03-21 11:55 c_schmitz Assigned To => c_schmitz
2014-03-21 11:55 c_schmitz Status new => feedback
2014-03-21 16:01 user11071 Note Added: 29495
2014-03-21 16:01 user11071 Status feedback => assigned
2014-03-21 16:18 c_schmitz Note Added: 29497
2014-03-21 16:18 c_schmitz Status assigned => resolved
2014-03-21 16:18 c_schmitz Resolution open => unable to reproduce
2014-03-21 16:18 c_schmitz Status resolved => closed