i have this error after i run the s:d:c command. How to fix this and could explain to me what happened with my DataProvider and Controller Files. I really appreciate it.
Errors during compilation: Rakuten\MemberCard\Model\Config\DataProvider Incompatible argument type: Required type: string. Actual type: \Rakuten\MemberCard\Model\Config\name; File: /var/www/html/rakuten_magento/app/code/Rakuten/MemberCard/Model/Config/DataProvider.php Rakuten\MemberCard\Controller\Adminhtml\Card\Index Incompatible argument type: Required type: \Magento\Backend\App\Action\Context. Actual type: \Magento\Framework\App\Action\Context; File: /var/www/html/rakuten_magento/app/code/Rakuten/MemberCard/Controller/Adminhtml/Card/Index.php Total Errors Count: 2
It may help you!
Regarding data provider file take reference from below code:
class DataProviderFileName extends \Magento\Ui\DataProvider\AbstractDataProvider
It may help you!
Hello @annq3sivn4281 ,
So here the issue is your file DataProvider is extending any another class, but the parent constructor section defined in DataProvider class constructor is incorrectly formed.
so the DataProvider constructor argument parameters are expecting arguments same as the extended class.
The origin of this issue could be that if this a third party module then it's dependent modules version / Magento version is changed. You can get the latest version module from vendor which is compatible to your Magento version.
If you're writing DataProvider class on your own, then make sure you inject parent constructor arguments in your extended file constructor argument with similar pattern.
If you still need further help, post constructor data of DataProvider class and the extended class constructor.
Hope it helps !