Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gridview buttons "POST" act as "GET" after latest "jquery.pjax.js" composer update #14926

Closed
letsjump opened this issue Oct 5, 2017 · 1 comment
Assignees
Milestone

Comments

@letsjump
Copy link

letsjump commented Oct 5, 2017

Yesterday, after the latest jquery.pjax.js update by composer (from version 2.0.6 to 2.0.7) it seems that by clicking on a \yii\grid\ActionColumn button of a yii\grid\GridView, it act as a pjax GET request also if button/link data-method attribute is set as POST.
So, every "delete" button, whose request needs to be "POST" by default yii2 controller behaviour, results as a

"Method Not Allowed (#405) Method Not Allowed. This url can only handle the following request methods: POST"

Gridview button html source is:

<a class="btn btn-default" href="/sale/delete/167" data-pjax="1" data-method="post">
    <span class="glyphicon glyphicon-trash"></span>
</a>
Q A
Yii2 version 2.0.12
PHP version 7.1.10-1+ubuntu16.04.1+deb.sury.org+1
browser Firefox 56.0
jquery.pjax.js 2.0.7
@SilverFire
Copy link
Member

Reproduced, will be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants