Hi,
when i try to logout i get this error:
Method Not Allowed. This url can only handle the following request methods: POST.
any help ?
Hi,
when i try to logout i get this error:
Method Not Allowed. This url can only handle the following request methods: POST.
any help ?
Seems like javascript is not working correctly. The logout link should send an ajax POST request.
Check for last updates/fixes in application.
Add <?= Html::csrfMetaTags() ?> to head section in backend and frontend/views/layouts/main.php
Thanks
iam using extension from dektrium/yii2-user
and i have the latest one. i have posted an issue… letz see.
<?= Html::csrfMetaTags() ?> this has solved my probleme… but i dono what the probleme was maybe u can explane me
This is necessary because View has been changed to not add it automatically anymore. See https://github.com/yiisoft/yii2/blob/master/framework/UPGRADE.md#upgrade-from-yii-20-beta last point.
i m getting same error
below is my code so plz help me how to pass post with below code
<li>
<a href="<?php echo Url::toRoute('/site/logout');?>">
<i class="ace-icon fa fa-power-off"></i>
Logout
</a>
</li>