uni-form install problem
#1
Posted 05 September 2009 - 02:09 PM
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?
#2
Posted 05 September 2009 - 04:40 PM
Darkfly, on 05 September 2009 - 02:09 PM, said:
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.
#3
Posted 05 September 2009 - 06:19 PM
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
#4
Posted 05 September 2009 - 06:23 PM
"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"
#5
Posted 06 September 2009 - 04:46 AM
Darkfly, on 05 September 2009 - 06:19 PM, said:
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
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.
#6
Posted 06 September 2009 - 05:15 AM
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.
#7
Posted 06 September 2009 - 09:12 AM
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...
#8
Posted 06 September 2009 - 09:24 AM
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
#9
Posted 07 September 2009 - 03:16 AM
Darkfly, on 06 September 2009 - 09:24 AM, said:
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.

Help











