Magento – Magento migration product error: UiComponentFactory->argumentsResolver(‘created_by’, NULL)

data-migration-toolerrormagento2migration

I'm trying to migrate my Magento 1.9.3.4 to Magento 2.2.2 with the data-migration-tool.

I did it and the store is working in localhost; I have the customers, sales, static pages and products.

I receive this fatal error when I tried to edit one product:

Fatal error: Uncaught TypeError: Argument 2 passed to
Magento\Framework\View\Element\UiComponentFactory::argumentsResolver()
must be of the type array, null given, called in
D:\xampp\htdocs\magento2\vendor\magento\framework\View\Element\UiComponentFactory.php
on line 212 and defined in
D:\xampp\htdocs\magento2\vendor\magento\framework\View\Element\UiComponentFactory.php:164
Stack trace:

0 D:\xampp\htdocs\magento2\vendor\magento\framework\View\Element\UiComponentFactory.php(212):
Magento\Framework\View\Element\UiComponentFactory->argumentsResolver('created_by',
NULL)

1 D:\xampp\htdocs\magento2\vendor\magento\module-ui\Component\Form\Field.php(84):
Magento\Framework\View\Element\UiComponentFactory->create('created_by',
'', Array)

2 D:\xampp\htdocs\magento2\vendor\magento\framework\View\Layout\Generator\UiComponent.php(159):
Magento\Ui\Component\Form\Field->prepare()

3 D:\xampp\htdocs\magento2\vendor\magento\framework\View\Layout\Generator\UiComponent.php(156):
Magento\Framework\View\Layout\Generator\UiComponent->prepare in
D:\xampp\htdocs\magento2\vendor\magento\framework\View\Element\UiComponentFactory.php
on line 164

Some suggestion?

Best Answer

I had this exact same error when creating a custom module. Not sure if this will solve it for your case, but maybe it will help to illuminate what's going on.

In my custom layout xml, I had a uiComponent that was not yet defined. File:

MyCompany/MyModule/view/adminhtml/layout/mycompany_mymodule_index_index.xml

<uiComponent name="my_custom_form" /> <!-- my_custom_form.xml file does not exist -->

Defining this UI component (or removing that uiComponent node in my layout xml) solved the problem for me.

Related Topic