Hi all,
I am not able to get the template running after updating to bootstrap4 - configuration told as in title/question. I am running in status production on my native mac apache2 server/localhost.
After updating composer.json with…
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.14",
"yiisoft/yii2-bootstrap4": "*", <<<<<
"yiisoft/yii2-swiftmailer": "~2.0.0 || ~2.1.0"
},
…and adding…
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
…to my two main.php from backend/frontend, and finally do
composer update
inside terminal (with positive replies after updating), I get the following output provided by the browser:
An internal server error occurred.
Checking my error_log file from apache2 server, it states following error:
[Sun Apr 14 18:19:42.976840 2019] [php7:notice] [pid 4634] [client ::1:60206] An Error occurred while handling another error:\nyii\\base\\InvalidConfigException: A circular dependency is detected for bundle 'frontend\\assets\\AppAsset'. in /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/View.php:295\nStack trace:\n#0 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetBundle.php(125): yii\\web\\View->registerAssetBundle('frontend\\\\assets...')\n#1 /Users/johnny/www/yii-application-new/frontend/views/layouts/main.php(13): yii\\web\\AssetBundle::register(Object(yii\\web\\View))\n#2 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(348): require('/Users/johnny/w...')\n#3 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(257): yii\\base\\View->renderPhpFile('/Users/johnny/w...', Array)\n#4 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(399): yii\\base\\View->renderFile('/Users/johnny/w...', Array, Object(frontend\\controllers\\SiteController))\n#5 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(385): yii\\base\\Controller->renderContent('<div class="sit...')\n#6 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/ErrorAction.php(139): yii\\base\\Controller->render('error', Array)\n#7 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/ErrorAction.php(118): yii\\web\\ErrorAction->renderHtmlResponse()\n#8 [internal function]: yii\\web\\ErrorAction->run()\n#9 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Action.php(94): call_user_func_array(Array, Array)\n#10 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(157): yii\\base\\Action->runWithParams(Array)\n#11 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Module.php(528): yii\\base\\Controller->runAction('error', Array)\n#12 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/ErrorHandler.php(108): yii\\base\\Module->runAction('site/error')\n#13 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/ErrorHandler.php(111): yii\\web\\ErrorHandler->renderException(Object(yii\\base\\InvalidConfigException))\n#14 [internal function]: yii\\base\\ErrorHandler->handleException(Object(yii\\base\\InvalidConfigException))\n#15 {main}\nPrevious exception:\nReflectionException: Class yii\\bootstrap\\BootstrapAsset does not exist in /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php:431\nStack trace:\n#0 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php(431): ReflectionClass->__construct('yii\\\\bootstrap\\\\B...')\n#1 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php(365): yii\\di\\Container->getDependencies('yii\\\\bootstrap\\\\B...')\n#2 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php(156): yii\\di\\Container->build('yii\\\\bootstrap\\\\B...', Array, Array)\n#3 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/BaseYii.php(349): yii\\di\\Container->get('yii\\\\bootstrap\\\\B...', Array, Array)\n#4 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetManager.php(264): yii\\BaseYii::createObject(Array)\n#5 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetManager.php(237): yii\\web\\AssetManager->loadBundle('yii\\\\bootstrap\\\\B...', Array, true)\n#6 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/View.php(286): yii\\web\\AssetManager->getBundle('yii\\\\bootstrap\\\\B...')\n#7 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/View.php(291): yii\\web\\View->registerAssetBundle('yii\\\\bootstrap\\\\B...', NULL)\n#8 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetBundle.php(125): yii\\web\\View->registerAssetBundle('frontend\\\\assets...')\n#9 /Users/johnny/www/yii-application-new/frontend/views/layouts/main.php(13): yii\\web\\AssetBundle::register(Object(yii\\web\\View))\n#10 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(348): require('/Users/johnny/w...')\n#11 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(257): yii\\base\\View->renderPhpFile('/Users/johnny/w...', Array)\n#12 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(399): yii\\base\\View->renderFile('/Users/johnny/w...', Array, Object(frontend\\controllers\\SiteController))\n#13 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(385): yii\\base\\Controller->renderContent('<div class="sit...')\n#14 /Users/johnny/www/yii-application-new/frontend/controllers/SiteController.php(77): yii\\base\\Controller->render('index')\n#15 [internal function]: frontend\\controllers\\SiteController->actionIndex()\n#16 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)\n#17 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(157): yii\\base\\InlineAction->runWithParams(Array)\n#18 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Module.php(528): yii\\base\\Controller->runAction('', Array)\n#19 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/Application.php(103): yii\\base\\Module->runAction('', Array)\n#20 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Application.php(386): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))\n#21 /Users/johnny/www/yii-application-new/index.php(17): yii\\base\\Application->run()\n#22 {main}\n\nNext yii\\base\\InvalidConfigException: Failed to instantiate component or class "yii\\bootstrap\\BootstrapAsset". in /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php:433\nStack trace:\n#0 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php(365): yii\\di\\Container->getDependencies('yii\\\\bootstrap\\\\B...')\n#1 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php(156): yii\\di\\Container->build('yii\\\\bootstrap\\\\B...', Array, Array)\n#2 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/BaseYii.php(349): yii\\di\\Container->get('yii\\\\bootstrap\\\\B...', Array, Array)\n#3 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetManager.php(264): yii\\BaseYii::createObject(Array)\n#4 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetManager.php(237): yii\\web\\AssetManager->loadBundle('yii\\\\bootstrap\\\\B...', Array, true)\n#5 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/View.php(286): yii\\web\\AssetManager->getBundle('yii\\\\bootstrap\\\\B...')\n#6 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/View.php(291): yii\\web\\View->registerAssetBundle('yii\\\\bootstrap\\\\B...', NULL)\n#7 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetBundle.php(125): yii\\web\\View->registerAssetBundle('frontend\\\\assets...')\n#8 /Users/johnny/www/yii-application-new/frontend/views/layouts/main.php(13): yii\\web\\AssetBundle::register(Object(yii\\web\\View))\n#9 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(348): require('/Users/johnny/w...')\n#10 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(257): yii\\base\\View->renderPhpFile('/Users/johnny/w...', Array)\n#11 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(399): yii\\base\\View->renderFile('/Users/johnny/w...', Array, Object(frontend\\controllers\\SiteController))\n#12 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(385): yii\\base\\Controller->renderContent('<div class="sit...')\n#13 /Users/johnny/www/yii-application-new/frontend/controllers/SiteController.php(77): yii\\base\\Controller->render('index')\n#14 [internal function]: frontend\\controllers\\SiteController->actionIndex()\n#15 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)\n#16 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(157): yii\\base\\InlineAction->runWithParams(Array)\n#17 /Users/johnny/www/yii-application-new
[Sun Apr 14 18:19:47.005593 2019] [php7:notice] [pid 4636] [client ::1:60207] An Error occurred while handling another error:\nReflectionException: Class yii\bootstrap\BootstrapAsset does not exist in /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php:431\nStack trace:\n#0 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php(431): ReflectionClass->__construct(‘yii\\bootstrap\\B…’)\n#1 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php(365): yii\di\Container->getDependencies(‘yii\\bootstrap\\B…’)\n#2 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build(‘yii\\bootstrap\\B…’, Array, Array)\n#3 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get(‘yii\\bootstrap\\B…’, Array, Array)\n#4 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetManager.php(264): yii\BaseYii::createObject(Array)\n#5 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetManager.php(237): yii\web\AssetManager->loadBundle(‘yii\\bootstrap\\B…’, Array, true)\n#6 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/View.php(286): yii\web\AssetManager->getBundle(‘yii\\bootstrap\\B…’)\n#7 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/View.php(291): yii\web\View->registerAssetBundle(‘yii\\bootstrap\\B…’, NULL)\n#8 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetBundle.php(125): yii\web\View->registerAssetBundle(‘backend\\assets\\…’)\n#9 /Users/johnny/www/yii-application-new/backend/views/layouts/main.php(13): yii\web\AssetBundle::register(Object(yii\web\View))\n#10 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(348): require(’/Users/johnny/w…’)\n#11 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile(’/Users/johnny/w…’, Array)\n#12 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(399): yii\base\View->renderFile(’/Users/johnny/w…’, Array, Object(backend\controllers\SiteController))\n#13 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(385): yii\base\Controller->renderContent(’<div class="sit…’)\n#14 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/ErrorAction.php(139): yii\base\Controller->render(‘error’, Array)\n#15 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/ErrorAction.php(118): yii\web\ErrorAction->renderHtmlResponse()\n#16 [internal function]: yii\web\ErrorAction->run()\n#17 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Action.php(94): call_user_func_array(Array, Array)\n#18 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\Action->runWithParams(Array)\n#19 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction(‘error’, Array)\n#20 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/ErrorHandler.php(108): yii\base\Module->runAction(‘site/error’)\n#21 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/ErrorHandler.php(111): yii\web\ErrorHandler->renderException(Object(Error))\n#22 [internal function]: yii\base\ErrorHandler->handleException(Object(Error))\n#23 {main}\n\nNext yii\base\InvalidConfigException: Failed to instantiate component or class “yii\bootstrap\BootstrapAsset”. in /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php:433\nStack trace:\n#0 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php(365): yii\di\Container->getDependencies(‘yii\\bootstrap\\B…’)\n#1 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build(‘yii\\bootstrap\\B…’, Array, Array)\n#2 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get(‘yii\\bootstrap\\B…’, Array, Array)\n#3 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetManager.php(264): yii\BaseYii::createObject(Array)\n#4 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetManager.php(237): yii\web\AssetManager->loadBundle(‘yii\\bootstrap\\B…’, Array, true)\n#5 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/View.php(286): yii\web\AssetManager->getBundle(‘yii\\bootstrap\\B…’)\n#6 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/View.php(291): yii\web\View->registerAssetBundle(‘yii\\bootstrap\\B…’, NULL)\n#7 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/AssetBundle.php(125): yii\web\View->registerAssetBundle(‘backend\\assets\\…’)\n#8 /Users/johnny/www/yii-application-new/backend/views/layouts/main.php(13): yii\web\AssetBundle::register(Object(yii\web\View))\n#9 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(348): require(’/Users/johnny/w…’)\n#10 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile(’/Users/johnny/w…’, Array)\n#11 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(399): yii\base\View->renderFile(’/Users/johnny/w…’, Array, Object(backend\controllers\SiteController))\n#12 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(385): yii\base\Controller->renderContent(’<div class="sit…’)\n#13 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/ErrorAction.php(139): yii\base\Controller->render(‘error’, Array)\n#14 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/ErrorAction.php(118): yii\web\ErrorAction->renderHtmlResponse()\n#15 [internal function]: yii\web\ErrorAction->run()\n#16 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Action.php(94): call_user_func_array(Array, Array)\n#17 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\Action->runWithParams(Array)\n#18 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction(‘error’, Array)\n#19 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/ErrorHandler.php(108): yii\base\Module->runAction(‘site/error’)\n#20 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/ErrorHandler.php(111): yii\web\ErrorHandler->renderException(Object(Error))\n#21 [internal function]: yii\base\ErrorHandler->handleException(Object(Error))\n#22 {main}\nPrevious exception:\nError: Class ‘yii\bootstrap\ActiveForm’ not found in /Users/johnny/www/yii-application-new/backend/views/site/login.php:20\nStack trace:\n#0 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(348): require()\n#1 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile(’/Users/johnny/w…’, Array)\n#2 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile(’/Users/johnny/w…’, Array, Object(backend\controllers\SiteController))\n#3 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(384): yii\base\View->render(‘login’, Array, Object(backend\controllers\SiteController))\n#4 /Users/johnny/www/yii-application-new/backend/controllers/SiteController.php(84): yii\base\Controller->render(‘login’, Array)\n#5 [internal function]: backend\controllers\SiteController->actionLogin()\n#6 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)\n#7 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)\n#8 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction(‘login’, Array)\n#9 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction(‘site/login’, Array)\n#10 /Users/johnny/www/yii-application-new/vendor/yiisoft/yii2/base
It seems to me that some parts of b4 are loaded correctly but obviously in some other parts of the magic framework there are still missing links/assets regarding the new b4 …if I interpret it correctly…
Maybe some of you guys could help me with this mess… thank you!
tagging:
@samdark