Magento 2 introduced the concept of UI elements which are extensively used in the admin. The grids are ones of those and have a great new feature: bookmarks. Bookmarking is the ability to save the current configuration of a grid (filters, columns order, ...) in order to retrieve this configuration when you log back in or when you select it from the "view" dropdown in the grid header. But, while developing, you may make mistakes that will break the grid and display a "Attention Something went wrong" modal box.
Go to your database, find the
ui_bookmark table and remove the line where
namespace matches the grid your having troubles with and where
Debugging example for the filters in the products list
Filters for the admin products list is defined in
<filters name="listing_filters"> node. This node has a child named
<item name="storageConfig" xsi:type="array"> which declares how the filters configuration persistence is managed:
<item name="provider"... >node tells Magento where to find the persisted configuration. The persisted configuration is a JSON object.
<item name="namespace"... >node tells Magento the path where is stored the configuration in the persistence provider.
In human words, this means: "the configuration of the filters is stored in the
.current.filters "object" of the
product_listing.product_listing.listing_top.bookmarks persistence JSON.
Let's now find the
product_listing.product_listing.listing_top.bookmarks persistence! This
product_listing.product_listing.listing_top.bookmarks is nothing more than a path matching to an XML path:
product_listing.product_listingpart targets the UI component with this name. See
Magento/Catalog/view/adminhtml/layout/catalog_product_index.xmlwhere there is this UI component declaration:
<uiComponent name="product_listing"/>. The reason why
product_listingis repeated in the
product_listing.product_listingpart is still unclear...
- then the
listing_top.bookmarksis easier. Just understanding it like each of the "objects" of this dotted expression is a node in the
product_listing.xmlfile with the corresponding
Once you found the
<bookmark name="bookmarks"> node, you can find its child
<item name="namespace" xsi:type="string">product_listing</item>. And the namespace here is what is found in the
namespace column of the
So, at the end of the day: when you have the "Attention Something went wrong" modal box, try to find the corresponding bookmark and have a look in your DB! When you edit the
config column, you will find the persistence JSON object. And, when there are active filters, you will also find JSON data that, when parsed as a JS object points to...
current.filters as stated in the
<item name="namespace" xsi:type="string">current.filters</item> node of