Yiibooster Error - Invalid Alias

YiiBooster Error: Alias "bootstrap.widgets.TbButton" is invalid.

Hi all,

I installed YiiBooster-1.0.5 as suggested but apparently I’m having issues with Aliases. Yii can’t find TbButton. Where did I go wrong?

I have attached file excerpts. If it makes any difference, the Yii core files are outside this application ($yii=’/var/www/html/yii/framework/yii.php’;) and this app is at /var/www/html/MyWebsite

Thx for your assistance!


[color="#006400"]/* moved from Miscellaneous */[/color]

try to change:




Thanks for your suggestion, Mirunho, but I’ve already tried ‘class’=>‘bootstrap.components.Bootstrap’ and it doesn’t solve the problem. Any other suggestions?


Maybe you PathOfAlias is wrong?

You can try

Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');

depends on your real path.

And did You copy bootrstrap files to extensions folder ? :P

Yes, the bootstrap files are located under the extension folder.

I originally used Yii::setPathOfAlias(‘bootstrap’, dirname(FILE).’/../extensions/bootstrap’) but it does not work either.


I misspelled the bootstrap folder name when I placed the files under the application’s extensions sub-directory.

Thanks all for your help and I’ll try to be more careful in the future!

I only load Bootstrap when needed, based on Joblo’s comment (#11204) in this wiki.

But if you forget to load Bootstrap before using its widgets, you will also get this "Invalid Alias …" error.