Yii Framework Forum: uni-form install problem - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

uni-form install problem Rate Topic: -----

#1 User is offline   Darkfly 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 04-September 09

Posted 05 September 2009 - 02:09 PM

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?
0

#2 User is offline   fduch 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 10-April 09

Posted 05 September 2009 - 04:40 PM

View PostDarkfly, on 05 September 2009 - 02:09 PM, said:

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.
0

#3 User is offline   Darkfly 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 04-September 09

Posted 05 September 2009 - 06:19 PM

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
0

#4 User is offline   Darkfly 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 04-September 09

Posted 05 September 2009 - 06:23 PM

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"
0

#5 User is offline   fduch 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 10-April 09

Posted 06 September 2009 - 04:46 AM

View PostDarkfly, on 05 September 2009 - 06:19 PM, said:

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

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.
0

#6 User is offline   horizons 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 123
  • Joined: 18-December 08

Posted 06 September 2009 - 05:15 AM

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.
0

#7 User is offline   Darkfly 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 04-September 09

Posted 06 September 2009 - 09:12 AM

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...
0

#8 User is offline   Darkfly 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 04-September 09

Posted 06 September 2009 - 09:24 AM

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 ;)
0

#9 User is offline   fduch 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 10-April 09

Posted 07 September 2009 - 03:16 AM

View PostDarkfly, on 06 September 2009 - 09:24 AM, said:

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users