You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some issues with adminhtml grids using GET ($this->setUseAjax(false); or the line is missing entirely) instead of POST ($this->setUseAjax(true);). The Payment Restrictions grid is a good example.
Steps to reproduce
Open Sales > Payment Restrictions in adminhtml
Ensure you have at least one payment restriction (add one if needed)
Check the url in the grid: Should be something like /admin/payment_restriction/index/key/123123123123123123/
Filter the column name for the value test
Check the url again: Should be something like admin/payment_restriction/index/key/123123123123123123/page/1/filter/bmFtZT10ZXN0JmNyZWF0ZWRfYXQlNUJsb2NhbGUlNUQ9ZGVfREU%3D/internal_restriction//form_key/hkc5ekHhVgwKdY6K/ and notice the // (empty param/value) in the url
Click on Reset Filter
Check the url again: Should be something like admin/payment_restriction/index/key/123123123123123123/page/1/filter//internal_restriction/form_key/form_key/hkc5ekHhVgwKdY6K/
In one line of the grid, click on a massaction checkbox
Select Change status and Status Disabled in the massaction select elements
Click on Submit
You will be redirected to the dashboard page and get the following error message:
Currently, using POST isn't mandatory so we could either fix this issue for grids using GET or $this->setUseAjax(true); should globally be the only supported way for grids.
Related Code
lib/Maho/Routing/ControllerDispatcher.php starting at line 105
Description
There are some issues with adminhtml grids using
GET($this->setUseAjax(false);or the line is missing entirely) instead ofPOST($this->setUseAjax(true);). ThePayment Restrictionsgrid is a good example.Steps to reproduce
Sales > Payment Restrictionsin adminhtml/admin/payment_restriction/index/key/123123123123123123/namefor the valuetestadmin/payment_restriction/index/key/123123123123123123/page/1/filter/bmFtZT10ZXN0JmNyZWF0ZWRfYXQlNUJsb2NhbGUlNUQ9ZGVfREU%3D/internal_restriction//form_key/hkc5ekHhVgwKdY6K/and notice the // (empty param/value) in the urlReset Filteradmin/payment_restriction/index/key/123123123123123123/page/1/filter//internal_restriction/form_key/form_key/hkc5ekHhVgwKdY6K/Change statusand StatusDisabledin the massaction select elementsSubmitCurrently, using
POSTisn't mandatory so we could either fix this issue for grids usingGETor$this->setUseAjax(true);should globally be the only supported way for grids.Related Code
lib/Maho/Routing/ControllerDispatcher.phpstarting at line 105public/js/mage/adminhtml/grid.js