Something went wrong error appears when mailchimp column sorted in customer listing grid
Closed this issue · 1 comments
Issue Description
When we click on mailchimp column in the customer listing grid it throws an error stating “Something went wrong with processing the default view and we have restored the filter to its original state”. And the grid does not load.
Preconditions
- Module Version 103.4.57 (mailchimp/mc-magento2)
- Magento Version 2.4.6-p2
Steps to reproduce
- Clean shop with install sample data
- Install “mailchimp/mc-magento2” module.
- Go to Customers->All Customers.
- Now click on Mailchimp column in the customer grid to sort it.
Actual and Expected result
Expected result:
When the Mailchimp column in the customer grid is clicked, it should not throw an error.
Actual result:
When the Mailchimp column in the customer grid is clicked, it throws an error.
Additional information
This issue occurs because when the Mailchimp column is clicked it goes into the database table ‘customer_grid_flat’ to search for the ‘mailchimp_async’ column which is not created and not present in the table.
Due to this, the error occurs.
It can be solved by disabling the sorting of the Mailchimp column in the customer grid.
Also, in other XML files such as “sales_order_grid.xml” and “product_listing.xml”
we can see that sortable false is given here.
But in “customer_listing.xml”, the sortable element is not present due to which it takes true by default. So using a sortable element in the customer listing file and giving it as false will disable sorting for the Mailchimp column in the customer listing grid.
File name
mailchimp/mc-magento2/view/adminhtml/ui_component/customer_listing.xml
Look at #1981