Yii Framework Forum: Strange include error with Zii jui widgets - Yii Framework Forum

Jump to content

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

Strange include error with Zii jui widgets Rate Topic: -----

#1 User is offline   toMeloos 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 19-September 09

Posted 07 February 2010 - 11:30 AM

I've been trying to get zii jui widgets to work on my site. Ran into the following weird behavior:

It seems like any zii jui widget I call in a view that uses the abstract class 'CJuiInputWidget' (like CJuiDatePicker) results in the following error:

Quote

YiiBase::include(CJuiWidget.php) [<a href='function.YiiBase-include'>function.YiiBase-include</a>]: failed to open stream: No such file or directory


Calling a zii jui widget that directly includes CJuiWidget.php (like CJuiTabs) does work. First calling CJuiTabs and then CJuiDatePicker, as well as adding "Yii::import('zii.widgets.jui.CJuiWidget');" to the view somewhere before calling the CJuiDatePicker also works.

I thus conclude that there must be a path issue when CJuiInputWidget tries to include CJuiWidget. Couldn't find anybody else running into this so I can't imagine that this is a bug. Perhaps this is related to the fact that I migrated the site from yii 1.0?

Can anyone help me figure out what is wrong here??
0

#2 User is offline   Onman 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 26-December 09
  • Location:The Netherlands

Posted 07 February 2010 - 02:05 PM

You may need to add the following line to your import:
'import'=>array(
...
'zii.widgets.jui.*',
),

1

#3 User is offline   toMeloos 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 19-September 09

Posted 08 February 2010 - 06:25 AM

That solved it. Thanks!
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