Simple theme on advanced template not working

After setting up the advanced template and configuring the frontend to use a theme (nothing fancy, just a copy of the views folder from the app) I get an error.

Here’s what I did:

  • installed advanced template and done init and configuration, so everyting works well when accesing http://localhost/yii...d/web/index.php

  • created folders /themes/test/ in frontend/web/ directory

  • copied the folder /frontend/views to /frontend/web/themes/test/

  • created the following config in frontend/config/main-local.php

$config = [

	'components' => [

		'view' => array(

			'class' => 'yii\base\View',

			'theme' => array(

				//'class' => 'yii\base\Theme',

				'pathMap' => array('@frontend/views' => '@frontend/web/themes/test/views'), 

                 //'baseUrl'   => '@frontend/web/themes/test',





  • refreshed frontend index

  • i get:

If I comment out that line it stops at a further instruction with "Calling unknown method: yii\base\View::registerAssetBundle()", when trying to do the default "[color="#505050"][font="Consolas,"][size="2"]AppAsset::register([/size][/font][/color][font="Consolas,"][size="2"]$this[/size][/font][color="#505050"][font="Consolas,"][size="2"]);" in frontend/views/layouts/main.php[/size][/font][/color]

Am I doing something wrong here?

This seems like the most safe and basic setup that one can perform for a theme on the advanced template and it fails…

Problem solved:

  • delete the [size=2] ‘class’ => ‘yii\base\View’, from the view configuration below[/size]

[size=2]- or replace it with ‘yii\web\View’[/size]