Reputation: 103
I'm getting this error with the latest version of the bootstrap extension when using the TbMenu widget
Property "TbMenu.itemCssClass" is not defined
if ($this->itemCssClass !== null)
$classes[] = $this->itemCssClass;
Also, I don't get the error on my local machine, only on a live server. Does anyone have any ideas what's going on?
Upvotes: 2
Views: 1239
Reputation: 155
itemCssClass property is inherited from zii.widgets.CMenu class which was added since YII v1.1.9, so for older version of YII it is not available. As quick fix for this issue you can change line 66 in {extensions}/bootstrap/widgets/TbBaseMenu.php file to:
if (isset($this->itemCssClass) && $this->itemCssClass !== null)
but it is highly recommended to upgrade your YII installation to the latest stable version.
Upvotes: 2
Reputation: 3242
I'd check you're installation of yii-bootstrap. That property should definitely exist on that class.
Try viewing that file on the live server and it should be (in mine at least) line 36 in {extensions}/bootstrap/widgets/TBMenu
If it's not you might want to debug a little further into why you're development machine is out of sync with Live.
Upvotes: 0