Chat on WhatsApp

Why does my UIComponent listing return 'No records found' even though I see rows in the DB?

Nine times out of ten the data-source is wired to the wrong collection, or the idFieldName in ui_component/<listing>.xml does not match the primary key on the SearchResult collection. Check three things: (1) etc/di.xml has a virtualType for <listing_name>_data_source with the right collection class; (2) the collection extends Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult, not the legacy resource collection; (3) component="Magento_Ui/js/grid/provider" is on the dataSource node. The grid silently fails open on schema mismatches — tail var/log/exception.log while you reload, the real error is there.

Was this helpful?