[EXTENSION] CKEditor | Undefined variable: model

How to fix error of "Undefined variable: model" in line 2;

$this->widget('application.extensions.my.ckeditor.CKEditor', array(






You should pass a model when you render the view

$this->render('some_view', array('model'=>$some_model));


Or you can add code in the view if you prefer that

$model = SomeModel::model()-find();


Thank Tommy… :)

Now I have a new error, "Undefined variable: language".


00078:         $this->setLanguage(Yii::app()->language);

00079:     }


00081:     public function setLanguage($value){

00082:         $lang = (($p = strpos($value, '_')) !== false) ? str_replace('_', '-', $value) : $value;

00083:         if (in_array($lang, $this->allowedLanguages)) {

00084:             $this->language = $lang;

00085:         }

00086:           else {

00087:              $suffix = empty($lang) ? 'en' : ($p !== false) ? strtolower(substr($lang, 0, $p)) : strtolower($lang);

00088:              if (in_array($suffix, $this->allowedLanguages)) $this->language = $suffix;

00089:           }

00090: if(isset($this->allowedLanguages[$language]))

00091:             $this->language=$language;

00092:     }


I tried to put ‘language’ in view, but it still error.

How to fix this?

I don’t know about CKEditor, had to download it now.

I would try with




Thank again Tommy…

Now I have new problem about how CKEditor appear in view page.

I used firefox v3.5.3

Here I attached the screencapt.



What I need from CKEditor is it can delete uploaded file where FCKEditor can’t do it like in CKEditor demo page.

But, in extention I can’t find the fitures upload and delete uploaded files.

How to anable this features?

thank a lot. :)