uni-form install problem

Hi all,

I have some problem installing the uni-form extension.

I copy the files after decompressing the zip files to protected/components folder,

after that i put in one form windows:

<?php $this->widget(‘application.components.UniForm’); ?>

only for test, and i have the error when i open the form:

Fatal error: Class ‘UniForm’ not found in C:\projects\yii\framework\web\CBaseController.php on line 138

Do you have aditional step to install this extensions?

Any idea?

You should extract downloaded zip int protected folder - zip already contains components folder. After unzipping protected/components folder must contains UniForm.php and CUFHtml.php files.

Yes, i use thi method.

i have UniForm.php and CUFHtml.php in the protected/components directory.

After that i have only to put:

<?php $this->widget(‘application.components.UniForm’); ?>

in one Form of one view, and i have the error:

Fatal error: Class ‘UniForm’ not found in C:\projects\yii\framework\web\CBaseController.php on line 138

The complet error is:

"true, ‘uni-form-generic.css’=>false); protected $widgetJsFiles = array(‘uni-form.jquery.js’); protected $widgetImages = array(); public function init() { $cs = Yii::app()->getClientScript(); $cs->registerCoreScript(‘jquery’); $am = Yii::app()->getAssetManager(); // Publish css foreach($this->widgetCssFiles as $cssFile=>$isReg) { $tempCss = $am->publish(dirname(FILE).$this->dirSeparator.$this->cssDir.$this->dirSeparator.$cssFile); if ($isReg) $cs->registerCssFile($tempCss); } // Publish images foreach($this->widgetImages as $key=>$image) $this->widgetImages[$key] = $am->publish(dirname(FILE).$this->dirSeparator.$this->imagesDir.$this->dirSeparator.$image); // Publish scripts foreach($this->widgetJsFiles as $jsFile) $cs->registerScriptFile($am->publish(dirname(FILE).$this->dirSeparator.$this->jsDir.$this->dirSeparator.$jsFile)); } public function run() { CHtml::$requiredCss = ‘’; CHtml::$afterRequiredLabel=’’; CHtml::$beforeRequiredLabel=’* ‘; CHtml::$errorSummaryCss = ‘errorMsg’; $cs = Yii::app()->getClientScript(); $cs->registerScript(‘uniform_function_ready’, “jQuery(‘form.uniForm’).uniform();”, CClientScript::POS_READY); } } ?>true, ‘uni-form-generic.css’=>false); protected $widgetJsFiles = array(‘uni-form.jquery.js’); protected $widgetImages = array(); public function init() { $cs = Yii::app()->getClientScript(); $cs->registerCoreScript(‘jquery’); $am = Yii::app()->getAssetManager(); // Publish css foreach($this->widgetCssFiles as $cssFile=>$isReg) { $tempCss = $am->publish(dirname(FILE).$this->dirSeparator.$this->cssDir.$this->dirSeparator.$cssFile); if ($isReg) $cs->registerCssFile($tempCss); } // Publish images foreach($this->widgetImages as $key=>$image) $this->widgetImages[$key] = $am->publish(dirname(FILE).$this->dirSeparator.$this->imagesDir.$this->dirSeparator.$image); // Publish scripts foreach($this->widgetJsFiles as $jsFile) $cs->registerScriptFile($am->publish(dirname(FILE).$this->dirSeparator.$this->jsDir.$this->dirSeparator.$jsFile)); } public function run() { CHtml::$requiredCss = ‘’; CHtml::$afterRequiredLabel=’’; CHtml::$beforeRequiredLabel=’* '; CHtml::$errorSummaryCss = ‘errorMsg’; $cs = Yii::app()->getClientScript(); $cs->registerScript(‘uniform_function_ready’, “jQuery(‘form.uniForm’).uniform();”, CClientScript::POS_READY); } } ?>

Fatal error: Class ‘UniForm’ not found in C:\projects\yii\framework\web\CBaseController.php on line 138"

I don’t know why Yii doesn’t find UniForm. application.components should points to Yii::app()->basePath/components folder. Error that you get isn’t related to UniForm - some troubles with paths in your project.

In my installation I have created a folder "uniform" in the protected/components directory

And have added

‘import’=>array(

‘application.components.uniform.*’,

in the config/main.php import array, but normally it should also work without it if you give the right name in widget code.

Are there any directories created when you unzip the file? some time ago since I have installed this component.

fduch -> the Yii::app()->basePath is set to the good place (C:\projects\RealEstate\protected)

Any other path toconfigure?

horizons -> i have already tried this manipulation, without succes.

If i put the files in \protected\components\uniform\ folder i have to use in my code:

<?php $this->widget(‘application.components.uniform.UniForm’); ?>

is the good way? after this change i have the same error…

After unzipping the file , i copy directly the files to componentsfolder,

CUFHtml.php and UniForm.php in components folder, and the jss and css in the good folder (components/js and componets/css

One other thing, i use another components (Portlet for example) in the same directory, and this component work without error message… so i assume i don’t have any problem of path…

Hey man… i found the problem

In UniForm.php, in the start of the file i have only the tag "<?", i have to change it to "<?php".

I think is one configuration of Apache/Php to accepte "<?" to the php coding, no?

Any way, thanks for the help, i go to test the extension ;)

Ok. thanks for pointing the problem. I’ll fix it.