Reputation: 11
When I use select2 in a yii2 form, an error like this always shows:
Invalid Configuration – yii\base\InvalidConfigException You must install 'yiisoft/yii2-bootstrap' extension for Bootstrap 3.x version support. Dependency to 'yii2-bootstrap' has not been included with 'yii2-krajee-base'. To resolve, you must add 'yiisoft/yii2-bootstrap' to the 'require' section of your application's composer.json file and then run 'composer update'.
NOTE: This dependency change has been done since v2.0 of 'yii2-krajee-base' because only one of 'yiisoft/yii2-bootstrap' OR 'yiisoft/yii2-bootstrap4' OR 'yiisoft/yii2-bootstrap5' extensions can be installed. The developer can thus choose and control which bootstrap extension library to install.
I have taken steps to resolve the error, but I still experience the same error
Upvotes: 0
Views: 111
Reputation: 55
You are using advanced template of yii2. You should add
'bsVersion' => '3.x'
, to you
common/config/main-local.php
file. You can change 3 to bootstrap version you are using.
Upvotes: 0