View Issue Details

This bug affects 1 person(s).
 256
IDProjectCategoryView StatusLast Update
08355Bug reportsSecuritypublic2013-11-25 15:39
Reportermfaber Assigned Tomfaber  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version2.05 RC 
Target Version2.05+Fixed in Version2.05+ 
Summary08355: Error (CDbException) when adding a user group to a survey
Description

When an existing user group is added to an existing survey, the following error appears:

CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sid' in 'where clause'. The SQL statement executed was: SELECT b.uid FROM (SELECT uid FROM lime_permissions WHERE sid = :surveyid) AS c RIGHT JOIN lime_user_in_groups AS b ON b.uid = c.uid WHERE c.uid IS NULL AND b.ugid = :postugid

E:\survey\htdocs\github\LimeSurvey\framework\db\CDbCommand.php(543)

531 {
532 if($this->_connection->enableProfiling)
533 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534
535 $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536 $message=$e->getMessage();
537 Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539
540 if(YII_DEBUG)
541 $message.='. The SQL statement executed was: '.$this->getText().$par;
542
543 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545 }
546 }
547
548 /*
549
Builds a SQL SELECT statement from the given query specification.
550 @param array $query the query specification in name-value pairs. The following
551
query options are supported: {@link select}, {@link distinct}, {@link from},
552 {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553
{@link limit}, {@link offset} and {@link union}.
554 @throws CDbException if "from" key is not present in given query parameter
555
@return string the SQL statement

Steps To Reproduce

Logged in as super admin
choose an existing survey
choose Survey permissions
Choose a user group and click add

TagsNo tags attached.
Bug heat256
Complete LimeSurvey version number (& build)131106
I will donate to the project if issue is resolvedNo
BrowserFF
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

mfaber

Activities

mfaber

mfaber

2013-11-15 21:53

reporter   ~27205

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

c_schmitz

c_schmitz

2013-11-25 15:39

administrator   ~27379

2.05RC7 released.

Related Changesets

LimeSurvey: 2.05 7f83cb4f

2013-11-15 20:52:00

mfaber


Committer: mfaber Details Diff
Fixed issue 08355: Error (CDbException) when adding a user group to a survey

Dev: table structure was changed in a previous commit
Affected Issues
08355
mod - application/models/User.php Diff File

Issue History

Date Modified Username Field Change
2013-11-09 19:28 mfaber New Issue
2013-11-10 11:16 c_schmitz Assigned To => c_schmitz
2013-11-10 11:16 c_schmitz Status new => assigned
2013-11-12 13:50 mfaber Issue Monitored: mfaber
2013-11-15 21:53 mfaber Assigned To c_schmitz => mfaber
2013-11-15 21:53 mfaber Changeset attached => LimeSurvey 2.05 7f83cb4f
2013-11-15 21:53 mfaber Note Added: 27205
2013-11-15 21:53 mfaber Resolution open => fixed
2013-11-15 21:55 mfaber Status assigned => resolved
2013-11-15 21:55 mfaber Fixed in Version => 2.05 RC
2013-11-22 11:27 c_schmitz Fixed in Version 2.05 RC => 2.05+
2013-11-22 11:28 c_schmitz Target Version => 2.05+
2013-11-25 15:39 c_schmitz Note Added: 27379
2013-11-25 15:39 c_schmitz Status resolved => closed
2021-08-12 07:47 guest Bug heat 254 => 256