2

I am facing this error while fetching data from custom table in Magento 2.3.5

the error is:

Argument 1 passed to Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider::searchResultToOutput() must implement interface Magento\Framework\Api\Search\SearchResultInterface, instance of Aspl\Contact\Model\ResourceModel\Contact\Grid\Collection given, called in D:\xampp\htdocs\M2\vendor\magento\framework\View\Element\UiComponent\DataProvider\DataProvider.php on line 282

please if anyone have idea about this problem then just give me solution.

Thanks In Advance.

1 Answer 1

0

you need to add

use Magento\Framework\Api\Search\SearchResultInterface;

AND need to implement that interface

something like below

class Collection extends Collection implements SearchResultInterface
2
  • but error not gone still
    – Deep Shah
    Jun 29, 2020 at 16:50
  • please clear cache and check Jun 30, 2020 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.