8

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?

  • Have u done indexing> – Amit Bera Jan 12 '18 at 22:01
  • Have u done indexing?I hope that created_by' custom attribute suggest to delete this attribute and then try it – Amit Bera Jan 12 '18 at 22:09

11 Answers 11

9

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.

3

Be sure that <uiComponent name="registration_form" /> name of uiComponent is the same as xml component name under MyCompany/MyModule/view/frontend/ui_component/registration_form.xml

3

I got such an error after migration and one of the attributes had a custom frontend_input. I see in your stack trace that the problem is with the created_by field. Maybe you should set the frontend_input for that field to text or something similar.

3

I migrated the data from magento 1.9.3.7 to magento 2.2.5 using the data migration tool. When I click the add product button through admin panel, it showed me the same error. The way I resolved it was to go to Admin->Store->Attribute Set. And edited the Default and Migration_Default Attributes Set. Initially the Migration_Default Attribute had the attribute sets but the Default was empty. I added the attributes to the Default Attribute Set and executed the reindex command

sudo php bin/magento indexer:reindex

Also make sure that the Schedule Design Update Group Contains the following attributes:

  • custom_design_from

  • custom_design_to

  • custom_design

  • custom_layout

And it worked for me... ;)

2

You can check if the frontend_input value of the attribute is a valid one. If you have a custom field check if the frontend component is defined correctly.

2

In our case this issue was also related from a Migration from 1.9.4 to 2.2.7 and it was to a pre-order module that added attributes to the Magento 1 site.

We had to update the table eav_attribute and amend frontend_input from 0 to text.

See our database query below:

UPDATE  magento2.eav_attribute  SET  frontend_input ='text' WHERE  attribute_id = 186;
UPDATE  magento2.eav_attribute  SET  frontend_input ='text' WHERE  attribute_id = 187;
  • Thanks it help me to resolve issue . – Navin Bhudiya Mar 13 at 5:58
2

In my case I found this attribute and changed text to text area. This fix the problem.

To do that you need edit attribute but in inspection mode.

Click right mouse button on Label of 'catalog input Type' , go down to find 'select option' and remove disabled='disabled' , This will activate option select and you can change to text now and save.

disable attribute

2

In my case,

I found created_by attribute on the "STORE -> [Attributes]Product".

enter image description here

And changed frontend_label to "any_sting...",

enter image description here

It should be has value.

This fix the problem.

1

In my case I had to delete the attribute causing issue. For example it was a custom product attribute names preorder. I deleted the attribute and it worked fine. None of the above solutions were applicable for me as the attribute was not referenced in any xml file.

0

I have been struggling with the same issue after migration from Magento 1.7 to Magento 2.

I think you have a issue with this product attribute: created_by

First you need to understand the role of that attribute, are you using it in your Magento 1 project ? it can be defined with a Magento 1 module.

In my case I had a issue with another custom attribute: aitfiles_title, and because I don't need it I just removed it from Magento 2 database.

delete from eav_attribute where attribute_code="aitfiles_title";

If you would like to do the same for your attribute:

delete from eav_attribute where attribute_code="created_by";

It works for me, and I'm able to access product page on Magento 2 admin panel.

0

You can access your attribute sets and remove the created_by from the respective product's group, then reindex the store. It solved my issue.

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.