My site now has the new theme, but if i try to perform the action: site/logout i have the error: Method Not Allowed (#405)
I read other post where suggest to change the VerbFilter settings or to add a data-method="post" in the link but i ask myself: why i must change these if they work fine with the other theme (default)?
So i read that could be the AssetBundle. In effect in my new main.php there is no asset registred. So i copy from the default main.php the follow code:
use app\assets\AppAsset;
AppAsset::register($this);
but i didn’t solve yet.
So i try to edit the assets\Appasset removing the $depends but nothing to do. I have always the error #405.
The main.php (layout) of that theme seems not to be 100% compatible with that of the default main.php.
The correction should be done on the theme’s main.php. Do not touch other parts of your app.
As you have noticed, it lacks the following line:
AppAsset::register($this);
"Logout" link is missing.
You have to write something similar that you see in the default main.php.
Also, the following line is missing in <header> section:
<?= Html::csrfMetaTags() ?>
The absence of this line will result in “Bad Request (400)” error when you hit “logout” link, even when you have the correct option of ‘data-method=“post”’.