View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
17622Bug reportsImport/Exportpublic2021-11-02 09:06
Reporterpogodam Assigned Toollehar  
PriorityhighSeveritycrash 
Status closedResolutionfixed 
Product Version5.x 
Summary17622: Cant export "Not completed" survey participant when "Anonymized responses" is set "no"
Description

I cannot export users who have not completed the survey. I checked several surveys and it seems to me that the problem only concerns surveys with "Anonymized responses" set to "no"

Steps To Reproduce
  1. Select survey
  2. Click "Survey participants"
  3. Click "Export"
  4. Select "Survey status" to "Not completed"
  5. Click "Download CSV file"
Additional Information

About 4 months ago I was upgrading Limesurvey from 3.x to 5x.
The survey was created on version 5.x.
I checked the latest version on the dev environment and the error still occurs.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)5.0.11
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmysql 8.x+
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2021-09-24 11:38

administrator   ~66610

Do you get an error message?

pogodam

pogodam

2021-09-24 11:44

reporter   ~66611

Last edited: 2021-09-24 11:50

Yes, after I click export button. Property "TokenDynamic.id" is not defined.

I don't know why error.jpg wasn't included.

error.jpg (11,204 bytes)   
error.jpg (11,204 bytes)   
c_schmitz

c_schmitz

2021-09-24 18:13

administrator   ~66614

Can you enable debug = 2 in application/config/config.php and try again, please? Paste the complete error message here.

pogodam

pogodam

2021-09-28 07:03

reporter   ~66627

Below is the error log. I don't know if I can set any text formatting so I paste "raw" text. Additionally, I am attaching a print screen which is more readable.

CException

Property "TokenDynamic.id" is not defined.

/docker/www/framework/db/ar/CActiveRecord.php(162)

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
@throws CException
154 */
155 public function __set($name,$value)
156 {
157 if($this->setAttribute($name,$value)===false)
158 {
159 if(isset($this->getMetaData()->relations[$name]))
160 $this->_related[$name]=$value;
161 else
162 parent::set($name,$value);
163 }
164 }
165
166 /*
167
Checks if a property value is null.
168 This method overrides the parent implementation by checking
169
if the named attribute is null or not.
170 @param string $name the property name or the event name
171
@return boolean whether the property value is null
172 */
173 public function
isset($name)
174 {

Stack Trace
#0

/docker/www/framework/db/ar/CActiveRecord.php(162): CComponent->__set()

157 if($this->setAttribute($name,$value)===false)
158 {
159 if(isset($this->getMetaData()->relations[$name]))
160 $this->_related[$name]=$value;
161 else
162 parent::__set($name,$value);
163 }
164 }
165
166 /*
167
Checks if a property value is null.

#1

/docker/www/application/helpers/export_helper.php(2297): CActiveRecord->__set()

2292 foreach ($bresultAll as $tokenKey => $tokenValue) {
2293 // creating TokenDynamic object to be able to decrypt easier
2294 $token = TokenDynamic::model($iSurveyID);
2295 // populate TokenDynamic object with values
2296 foreach ($tokenValue as $key => $value) {
2297 $token->$key = $value;
2298 }
2299 // decrypting
2300 $token->decrypt();
2301 $bresultAll[$tokenKey] = $token->attributes;
2302 }

#2

/docker/www/application/controllers/admin/tokens.php(1541): tokensExport()

1536 $this->_newtokentable($iSurveyId);
1537 }
1538
1539 if (!is_null(Yii::app()->request->getPost('submit'))) {
1540 Yii::app()->loadHelper("export");
1541 tokensExport($iSurveyId);
1542 } else {
1543
1544 $aData['surveyid'] = $iSurveyId;
1545 $aData['thissurvey'] = getSurveyInfo($iSurveyId); // For tokenbar view
1546 $aData['sAction'] = App()->createUrl("admin/tokens", array("sa" => "exportdialog", "surveyid" => $iSurveyId));

#3
unknown(0): tokens->exportdialog()
#4

/docker/www/framework/web/actions/CAction.php(115): ReflectionMethod->invokeArgs()

110 elseif($param->isDefaultValueAvailable())
111 $ps[]=$param->getDefaultValue();
112 else
113 return false;
114 }
115 $method->invokeArgs($object,$ps);
116 return true;
117 }
118 }

#5

/docker/www/application/core/Survey_Common_Action.php(86): CAction->runWithParamsInternal()

81 $oMethod = new ReflectionMethod($this, $sDefault);
82 }
83
84 // We're all good to go, let's execute it
85 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
86 return parent::runWithParamsInternal($this, $oMethod, $params);
87 }
88
89 /*
90
Some functions have different parameters, which are just an alias of the
91 * usual parameters we're getting in the url. This function just populates

#6

/docker/www/framework/web/CController.php(308): Survey_Common_Action->runWithParams()

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;

#7

/docker/www/framework/web/CController.php(286): CController->runAction()

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();

#8

/docker/www/framework/web/CController.php(265): CController->runActionWithFilters()

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);

#9

/docker/www/application/controllers/AdminController.php(202): CController->run()

197 }
198
199 $this->runModuleController($action);
200
201
202 return parent::run($action);
203 }
204
205 /*
206
Starting with LS4, 3rd party developper can extends any of the LimeSurve controllers.
207 *

#10

/docker/www/framework/web/CWebApplication.php(282): AdminController->run()

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)));

#11

/docker/www/framework/web/CWebApplication.php(141): CWebApplication->runController()

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.

#12

/docker/www/framework/base/CApplication.php(185): CWebApplication->processRequest()

180 public function run()
181 {
182 if($this->hasEventHandler('onBeginRequest'))
183 $this->onBeginRequest(new CEvent($this));
184 register_shutdown_function(array($this,'end'),0,false);
185 $this->processRequest();
186 if($this->hasEventHandler('onEndRequest'))
187 $this->onEndRequest(new CEvent($this));
188 }
189
190 /**

#13

/docker/www/index.php(192): CApplication->run()

187 require_once APPPATH . 'core/LSYii_Application' . EXT;
188
189 $config = require_once(APPPATH . 'config/internal' . EXT);
190
191 Yii::$enableIncludePath = false;
192 Yii::createApplication('LSYii_Application', $config)->run();
193
194 / End of file index.php /
195 / Location: ./index.php /

ollehar

ollehar

2021-10-22 09:30

administrator   ~66899

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

Related Changesets

LimeSurvey: master d2f29d49

2021-10-22 09:30:16

ollehar


Committer: GitHub Details Diff
Fixed issue 17622: Cant export "Not completed" survey participant when "Anonymized responses" is set "No" (#2080) Affected Issues
17622
mod - application/helpers/export_helper.php Diff File

Issue History

Date Modified Username Field Change
2021-09-24 08:45 pogodam New Issue
2021-09-24 11:38 ollehar Note Added: 66610
2021-09-24 11:38 ollehar Bug heat 0 => 2
2021-09-24 11:44 pogodam Note Added: 66611
2021-09-24 11:44 pogodam File Added: error.jpg
2021-09-24 11:44 pogodam Bug heat 2 => 4
2021-09-24 11:50 ollehar Priority none => high
2021-09-24 11:50 ollehar Zoho Project Synchronization => |Yes|
2021-09-24 18:13 c_schmitz Assigned To => c_schmitz
2021-09-24 18:13 c_schmitz Status new => feedback
2021-09-24 18:13 c_schmitz Note Added: 66614
2021-09-24 18:13 c_schmitz Bug heat 4 => 6
2021-09-28 07:03 pogodam Note Added: 66627
2021-09-28 07:03 pogodam File Added: Screenshot 2021-09-28 at 06-59-16 CException.png
2021-09-28 07:03 pogodam Status feedback => assigned
2021-10-05 16:53 ollehar Assigned To c_schmitz => ollehar
2021-10-05 17:16 ollehar Status assigned => ready for testing
2021-10-22 09:30 ollehar Changeset attached => LimeSurvey master d2f29d49
2021-10-22 09:30 ollehar Note Added: 66899
2021-10-22 09:30 ollehar Resolution open => fixed
2021-10-22 09:30 c_schmitz Status ready for testing => resolved
2021-11-02 09:06 c_schmitz Status resolved => closed