I am encountering a very strange behavior with the GridView Sorting and Filtering. The filtering on its own works with no problems, and the sorting too. But after I sort, the filtering doesn’t update the search model with the filter values. After going through the code for hours I have encountered something very bizarre in the requests sent to the action from gridview during sorting.
URL Before sort:
?EsIssue%5Bid%5D=&EsIssue%5Bobj_name%5D=crm&EsIssue%5Bcategory%5D=&EsIssue%5Btitle%5D=&EsIssue%5Blast_comment%5D=&EsIssue%5Blast_status%5D=&EsIssue%5Bcreator_name%5D=&EsIssue%5Bdate_created%5D=&EsIssue_page=1&ajax=yw0
URL on sort:
/EsIssue%5Bid%5D//EsIssue%5Bobj_name%5D/crm/EsIssue%5Bcategory%5D//EsIssue%5Btitle%5D//EsIssue%5Blast_comment%5D//EsIssue%5Blast_status%5D//EsIssue%5Bcreator_name%5D//EsIssue%5Bdate_created%5D//EsIssue_page/1/ajax/yw0/EsIssue_sort/last_comment?ajax=yw0
URL filter after sort:
EsIssue%5Bid%5D//EsIssue%5Bobj_name%5D/crm/EsIssue%5Bcategory%5D//EsIssue%5Btitle%5D//EsIssue%5Blast_comment%5D//EsIssue%5Blast_status%5D//EsIssue%5Bcreator_name%5D//EsIssue%5Bdate_created%5D//EsIssue_page/1/ajax/yw0/EsIssue_sort/last_comment?EsIssue%5Bid%5D=&EsIssue%5Bobj_name%5D=test&EsIssue%5Bcategory%5D=&EsIssue%5Btitle%5D=&EsIssue%5Blast_comment%5D=&EsIssue%5Blast_status%5D=&EsIssue%5Bcreator_name%5D=&EsIssue%5Bdate_created%5D=&EsIssue_page=1&ajax=yw0
I don’t even know where to start to find fix the issue. What I am seeing is that the the new filter GETs are appeneded to the old ones that are in the path format. I want to make filter and sort to have only path or only query string but not both. What can I do? My url manager is pretty simple:
'urlManager' => ['urlFormat' => 'path',
'showScriptName' => false,
'rules' => [
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'/'=>'/core'
]]
This behavior happens on every GridView throughout the entire system.
Thank you in advance,
Gasim Gasimzada