View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
08110Bug reportsSurvey editingpublic2013-09-24 14:20
Reportermfaber Assigned Tomdekker  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version2.05 RC 
Fixed in Version2.05 RC 
Summary08110: Error: Property "Permission.sid" is not defined. (when copying a survey)
Description

Error appears when a survey is copied (see below for stack trace)

Steps To Reproduce

New survey (+)
Tab copy
select survey to copy
type new survey title
copy

--> error (see below for stack trace)

Additional Information

CException

Property "Permission.sid" is not defined.

E:\survey\htdocs\github\LimeSurvey\framework\db\ar\CActiveRecord.php(159)

147 PHP setter magic method.
148
This method is overridden so that AR attributes can be accessed like properties.
149 @param string $name property name
150
@param mixed $value property value
151 */
152 public function __set($name,$value)
153 {
154 if($this->setAttribute($name,$value)===false)
155 {
156 if(isset($this->getMetaData()->relations[$name]))
157 $this->_related[$name]=$value;
158 else
159 parent::set($name,$value);
160 }
161 }
162
163 /*
164
Checks if a property value is null.
165 This method overrides the parent implementation by checking
166
if the named attribute is null or not.
167 @param string $name the property name or the event name
168
@return boolean whether the property value is null
169 */
170 public function
isset($name)
171 {
Stack Trace
#0

  • E:\survey\htdocs\github\LimeSurvey\framework\db\ar\CActiveRecord.php(159): CComponent->__set("sid", "582284")
    #1
  • E:\survey\htdocs\github\LimeSurvey\framework\base\CModel.php(606): CActiveRecord->__set("sid", "582284")
    #2
    – E:\survey\htdocs\github\LimeSurvey\application\models\Permission.php(285): CModel->offsetSet("sid", "582284")
    280 function copySurveyPermissions($iSurveyIDSource,$iSurveyIDTarget)
    281 {
    282 $aRows=self::model()->findAll("entity_id=:sid AND entity='survey'", array(':sid'=>$iSurveyIDSource));
    283 foreach ($aRows as $aRow)
    284 {
    285 $aRow['sid']=$iSurveyIDTarget;
    286 try {
    287 $this->insertSomeRecords($aRow);
    288 }
    289 catch (Exception $e)
    290 {
    #3
    – E:\survey\htdocs\github\LimeSurvey\application\controllers\admin\surveyadmin.php(955): Permission->copySurveyPermissions("844845", "582284")
    950 Question::model()->updateAll(array('relevance'=>'1'),'sid='.$aImportResults['newsid']);
    951 QuestionGroup::model()->updateAll(array('grelevance'=>'1'),'sid='.$aImportResults['newsid']);
    952 }
    953 if (!isset($aExcludes['permissions']))
    954 {
    955 Permission::model()->copySurveyPermissions($iSurveyID,$aImportResults['newsid']);
    956 }
    957 }
    958 else
    959 {
    960 $importerror = true;
    #4
    unknown(0): SurveyAdmin->copy()
    #5
  • E:\survey\htdocs\github\LimeSurvey\framework\web\actions\CAction.php(108): ReflectionMethod->invokeArgs(SurveyAdmin, array())
    #6
    – E:\survey\htdocs\github\LimeSurvey\application\core\Survey_Common_Action.php(99): CAction->runWithParamsInternal(SurveyAdmin, ReflectionMethod, array("sa" => "copy"))
    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
    #7
  • E:\survey\htdocs\github\LimeSurvey\framework\web\CController.php(308): Survey_Common_Action->runWithParams(array("sa" => "copy"))
    #8
  • E:\survey\htdocs\github\LimeSurvey\framework\web\CController.php(286): CController->runAction(SurveyAdmin)
    #9
  • E:\survey\htdocs\github\LimeSurvey\framework\web\CController.php(265): CController->runActionWithFilters(SurveyAdmin, array())
    #10
  • E:\survey\htdocs\github\LimeSurvey\application\controllers\AdminController.php(169): CController->run("survey")
    #11
  • E:\survey\htdocs\github\LimeSurvey\framework\web\CWebApplication.php(282): AdminController->run("survey")
    #12
  • E:\survey\htdocs\github\LimeSurvey\framework\web\CWebApplication.php(141): CWebApplication->runController("admin/survey/sa/copy")
    #13
  • E:\survey\htdocs\github\LimeSurvey\framework\base\CApplication.php(169): CWebApplication->processRequest()
    #14
  • E:\survey\htdocs\github\LimeSurvey\index.php(190): CApplication->run()
    2013-08-22 20:11:49 Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 Yii Framework/1.1.13
TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)130822
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL 5.0.10
Server OS (if known)Win7
Webserver software & version (if known)Apache/2.4.3 (Win32)
PHP VersionPhP 5.4.7

Users monitoring this issue

There are no users monitoring this issue.

Activities

mdekker

mdekker

2013-08-23 11:17

reporter   ~26055

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=12903

mdekker

mdekker

2013-08-23 11:19

reporter   ~26056

Please check

mfaber

mfaber

2013-08-23 11:44

reporter   ~26057

Works!
Thanks!
:)

c_schmitz

c_schmitz

2013-09-24 14:20

administrator   ~26351

2.05RC1 released

Related Changesets

LimeSurvey: 2.05 56a02850

2013-08-23 09:15:54

mdekker

Details Diff
Fixed 08110: Error: Property "Permission.sid" is not defined. (when copying a survey) Affected Issues
08110
mod - application/models/Permission.php Diff File

Issue History

Date Modified Username Field Change
2013-08-22 20:18 mfaber New Issue
2013-08-23 10:30 mdekker Assigned To => mdekker
2013-08-23 10:30 mdekker Status new => assigned
2013-08-23 11:17 mdekker Changeset attached => LimeSurvey 2.05 56a02850
2013-08-23 11:17 mdekker Note Added: 26055
2013-08-23 11:17 mdekker Resolution open => fixed
2013-08-23 11:19 mdekker Note Added: 26056
2013-08-23 11:44 mfaber Note Added: 26057
2013-08-23 11:47 mfaber Status assigned => resolved
2013-08-23 11:47 mfaber Fixed in Version => 2.05 RC
2013-09-24 14:20 c_schmitz Note Added: 26351
2013-09-24 14:20 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing