View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
18158Bug reportsRemoteControlpublic2022-06-07 12:06
Reporterchimp358 Assigned ToDenisChenu  
PrioritynoneSeverityfeature 
Status closedResolutionfixed 
Fixed in Version5.3.x 
Summary18158: Property "CDbCriteria.qid" is not defined status returned by delete_question
Description


Error is thrown when calling the delete_question RPC method.

Additional Information


Seems to be caused by an array being passed to the constructor of CDbCriteria by way of:


  1. https://github.com/LimeSurvey/LimeSurvey/blob/997786dc867fee26015f31fc424fa759794b9022/application/helpers/remotecontrol/remotecontrol_handle.php#L1447

  2. https://github.com/LimeSurvey/LimeSurvey/blob/9cb60ed801bc539d76a51b7a33ebda48b84ffff1/framework/db/ar/CActiveRecord.php#L1477

  3. https://github.com/LimeSurvey/LimeSurvey/blob/2fdb4090f98060e022e251c176926ccda5151807/framework/db/schema/CDbCommandBuilder.php#L588

  4. https://github.com/LimeSurvey/LimeSurvey/blob/2fdb4090f98060e022e251c176926ccda5151807/framework/db/schema/CDbCriteria.php#L160


So it fails because the attribute qid of CDbCriteria is not defined, but the method tries to assign it the value passed in the array.


The solution could be to use findAllByAttributes instead of findAll

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version

Users monitoring this issue

chimp358

Activities

guest

guest

2022-06-01 13:12

viewer   ~70188

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

LimeBot

LimeBot

2022-06-07 12:06

administrator   ~70259

Fixed in Release 5.3.19+220607

Related Changesets

LimeSurvey: master 78dca0ba

2022-06-01 15:12

chimp358

Committer: GitHub


Details Diff
Fixed issue 18158: `Property "CDbCriteria.qid" is not defined` status returned by delete_question (#2444)

Dev: Use Question::model()->findByPk($iQuestionID)->delete()
Affected Issues
18158
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

Issue History

Date Modified Username Field Change
2022-05-29 02:09 chimp358 New Issue
2022-05-29 02:13 chimp358 Issue Monitored: chimp358
2022-05-29 02:13 chimp358 Bug heat 0 => 2
2022-05-30 12:35 DenisChenu Assigned To => DenisChenu
2022-05-30 12:35 DenisChenu Status new => assigned
2022-06-01 13:12 chimp358 Changeset attached => LimeSurvey master 78dca0ba
2022-06-01 13:12 guest Note Added: 70188
2022-06-01 13:12 guest Bug heat 2 => 4
2022-06-01 13:20 DenisChenu Project Feature requests => Bug reports
2022-06-01 13:20 DenisChenu Status assigned => resolved
2022-06-01 13:20 DenisChenu Resolution open => fixed
2022-06-01 13:20 DenisChenu Fixed in Version => 5.3.x
2022-06-07 12:06 LimeBot Note Added: 70259
2022-06-07 12:06 LimeBot Status resolved => closed
2022-06-07 12:06 LimeBot Bug heat 4 => 6