View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05798Bug reportsSurvey participants (Tokens)public2012-03-11 16:32
ReporterMazi Assigned Tomagiclko 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00a2 
Target Version2.00a2Fixed in Version2.00a2 
Summary05798: Token icons remain visible after having deleted a token table
Description

If I delete a token table, I receive an according message but the user stays at the token admin scren with all icons still being enabled. So when seeing this message, I can click any of the icons which leads to e.g. the following error message for "manage additional attribute fields":
CDbException

The table "{{tokens_376249}}" for active record class "Tokens_dynamic" cannot be found in the database.

C:\xampp\htdocs\limesurvey_yii\framework\db\ar\CActiveRecord.php(2276)

Steps To Reproduce
  1. Create a token table
  2. Go to token admin screen
  3. Delete token table
  4. When seeing the according "token table deleted" message, click the "manage additional attribute fields" icon.
Additional Information

Source code snippet:
2264 private $_model;
2265
2266 /*
2267
Constructor.
2268 @param CActiveRecord $model the model instance
2269
/
2270 public function __construct($model)
2271 {
2272 $this->_model=$model;
2273
2274 $tableName=$model->tableName();
2275 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2276 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2277 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2278 if($table->primaryKey===null)
2279 {
2280 $table->primaryKey=$model->primaryKey();
2281 if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2282 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2283 else if(is_array($table->primaryKey))
2284 {
2285 foreach($table->primaryKey as $name)
2286 {
2287 if(isset($table->columns[$name]))
2288 $table->columns[$name]->isPrimaryKey=true;

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)12411
I will donate to the project if issue is resolvedNo
BrowserFirefox 9 and IE 9
Database type & versionMySQL 5
Server OS (if known)Win 7
Webserver software & version (if known)Apache 2.2
PHP Version5.3.1

Users monitoring this issue

There are no users monitoring this issue.

Activities

magiclko

magiclko

2012-02-10 20:05

reporter   ~17369

Fixed in rev12441. The icons were always accessible but clicking on anyone resulted in table restore screen in 1.91. Added the same behavior now in _yii.

c_schmitz

c_schmitz

2012-03-11 16:32

administrator   ~17854

2.00alpha 2 Build 120212 released

Issue History

Date Modified Username Field Change
2012-02-09 21:52 Mazi New Issue
2012-02-09 21:52 Mazi Status new => assigned
2012-02-09 21:52 Mazi Assigned To => magiclko
2012-02-10 20:05 magiclko Note Added: 17369
2012-02-10 20:05 magiclko Status assigned => resolved
2012-02-10 20:05 magiclko Fixed in Version => 2.00a2
2012-02-10 20:05 magiclko Resolution open => fixed
2012-03-11 16:32 c_schmitz Note Added: 17854
2012-03-11 16:32 c_schmitz Status resolved => closed
2016-12-08 10:39 c_schmitz Category Tokens => Survey participants (Tokens)