Check for duplicate secret parameter#15
Check for duplicate secret parameter#15alex-code wants to merge 2 commits intoyiisoft:masterfrom alex-code:secret-parame
Conversation
If pjax receives data as an array you can end up with duplicate secret parameters `_pjax=#container` Can occur with a filter on a `GridView`.
|
can you explain a bit more how and why this can happen? and shouldn't we fix the cause then rather then working around it? |
|
Say you have a When you change the GridView filter Pjax catches the form submit and appends Now in your action where you render the GridView it sets the If you change the filter again the Pjax then serializes that form into an array and adds the |
Simplified
|
Reproduced. The fix works fine |
|
I think it's better to solve this problem on js side than touch PHP part of Yii |
|
Merged 18a9183 |
|
Thank you! |
If pjax receives data as an array you can end up with duplicate secret parameters
_pjax=#containerCan occur with a filter on a
GridView.