- How to clear selected active filter in magento2 by DB:
Whenever you filter any column fields from magento2 admin grid it will save the filtered values into following
table “ui_bookmark“. - Some time due “Integrity constraint violation” issue you may get issue called “some thing went wrong” popup message.
- In this scenario you will not get any log detail from var/log and nginx or apache log files.
- You have to check the browser console or you can check your report folder.
- New report file will generate.There you may get the detail about the issue.
In my case I have created same name column filed (Ex: mycustom1) into sales_order & sales_order_grid in both table. While filter by custom column i got the following error message.Either i need to fix by indexer or i need to remove selected column field from filter section.
Here am going to remove selected column field from table. Here send ur user_id, for example am using my user_id called 1
1. select * from ui_bookmark where user_id = 1 AND namespace like ‘%sales_order_grid%’;
2. After execute above query , you will get 2 rows
3. sales_order_grid – identifier is “current” & sales_order_grid – identifier is “default”
4. Go to edit sales_order_grid – identifier is “current” -> config column
FROM
{“current”:{“filters”:{“applied“:{“placeholder”:true,”mobile”:”0″,”mycustom1″:”yes”}},……
TO
{“current”:{“filters”:{“applied“:{“placeholder”:true,”mobile”:”0″}},…..
5. We can also delete entire row & we can check. But some times it won’t reflect to admin login session. Once you delete entire row with in next second again same row will created with exist value. To avoid better remove your filter fields from DB directly & update. It will work.