YII Widgets Quick Tip #1

August 25, 2012 | In: Widget, yii

I’ve encountered this error below:

    Alias "widgets.yourwidget.YourWidget" is invalid. Make sure it points to an existing PHP file.

On the php view file:

widget('widgets.yourwidget.YourWidget'); ?>

But the weird thing is it’s working perfectly on my localhost but not when i deploy it on my “Production” server.

Then after a few hours, found out the fix:

 widget('application.widgets.yourwidget.YourWidget'); ?>

The missing is the ‘application’ part of the widget.

Hope this will help someone new to YII like me.

1 Response to YII Widgets Quick Tip #1


YII UI Dialog Widget to keep you DRY | FROST

November 20th, 2012 at 9:45 pm

[…] is my second post for this wonderful PHP Framework called YII. On my last post about YII’s widget, I just mentioned how to include/use it in your site. Now I’m having some progress, […]

Comment Form