G
G
Greg Popov2017-05-22 14:08:47
Yii
Greg Popov, 2017-05-22 14:08:47

How to override assetManager for Gii module?

Demolished the standard bootstrap and installed the sass build.

... config ...
        'assetManager' => [
            'bundles' => [
                'yii\bootstrap\BootstrapAsset' => [
                    'sourcePath' => '@bower/bootstrap-sass/assets',
                    'css' => [],
                ],
                'yii\bootstrap\BootstrapPluginAsset' => [
                    'sourcePath' => '@bower/bootstrap-sass/assets',
                    'js' => ['javascripts/bootstrap.min.js']
                ],
            ],
        ],

I overridden the assets for Bootstrap in the project configuration, but when loading the Gii module, it throws an error that the route to the published asset was not found, why is that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-05-22
@webinar

Because you redefined everything and now the required assets for gii are not found. Usually there is no such problem if you have an anvanced template. Then on the frontend you make any config with any bikes, and leave the standard backend and everything works there.
Although it is certainly possible to reconfigure assets for gii:
www.yiiframework.com/doc-2.0/yii-gii-giiasset.html
But the problem will probably not only be with gii, but with other modules dependent on bootstrap

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question