12

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?

3
  • Have u done indexing>
    – Amit Bera
    Commented Jan 12, 2018 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
    Commented Jan 12, 2018 at 22:09
  • @AmitBera Any help thanks magento.stackexchange.com/q/318269/57334
    – zus
    Commented Sep 14, 2020 at 9:29

17 Answers 17

15

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.

1
  • The obvious is often the most painful, thankyou! Commented Oct 12, 2020 at 7:39
7

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;
4
  • Thanks it help me to resolve issue . Commented Mar 13, 2019 at 5:58
  • @NavinBhudiya May i know how you exactly solve the issue, could you pls help me to solve the issue for me magento.stackexchange.com/q/318269/57334
    – zus
    Commented Sep 15, 2020 at 6:03
  • yes if u check in ur eav attribute tables u can search in frontend_input so just search label word in frontend input if u get any result then just update frontend input => text so it will be fixed ur issue Commented Sep 15, 2020 at 6:33
  • please try if it works please like my comment thanks Commented Sep 15, 2020 at 6:34
6

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

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 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 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

1
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.

2

I migrated from magento 1.9.4 to 2.3.3 and I got the issue.

We had to update the table eav_attribute and field frontend_input from 0 to "text". You can search attribute with frontend_input = '0' See our database query below:

SELECT * FROM `eav_attribute` WHERE `frontend_input` = '0'

I see attribute with attribute_code are "preorder" and "preorderdescript"

UPDATE  eav_attribute  SET  frontend_input ='text' WHERE  attribute_code = 'preorder';
UPDATE  eav_attribute  SET  frontend_input ='text' WHERE  attribute_code = 'preorderdescript';

Goodluck!

1
  • Thank you! This worked for me when upgrading from 1.8.1.0 to 2.3.4
    – Dan Norris
    Commented May 14, 2020 at 11:52
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.

1
0

I have similar issue. For me it was problem with custom attribute. In this case it's part \UiComponentFactory->argumentsResolver('created_by', NULL) and attribute is created_by.

I had it in eav_attribute table but it was missed in product attributes list in admin. So I've just removed it programicaly. Something like that:

// $this->eavSetupFactory - \Magento\Eav\Setup\EavSetupFactory 
$eavSetup = $this->eavSetupFactory->create();
$entityTypeId = 4; // For catalog_product attribute
$eavSetup->removeAttribute($entityTypeId, 'speurtocht_attachment');
1
  • May i know how to you found the exact attribute?
    – zus
    Commented Sep 14, 2020 at 14:51
0

Well, everyone shares their experience so I have to add mine to maybe it will help someone :)

I migrate the data from Magento 1.9 to Magento 2.3.4 with the data migration tool

In my case, I am facing the same error and check all the above cases but nothing can help at the end I noticed I don't have attribute sets in my database :/

So I install the new Magento because I can't find Magento database :/ and grab the default attribute sets values and insert in my attribute table :)

INSERT INTO `eav_attribute_set` (`attribute_set_id`, `entity_type_id`, `attribute_set_name`, `sort_order`) VALUES
(1, 1, 'Default', 2),
(2, 2, 'Default', 2),
(3, 3, 'Default', 1),
(4, 4, 'Default', 1),
(5, 5, 'Default', 1),
(6, 6, 'Default', 1),
(7, 7, 'Default', 1),
(8, 8, 'Default', 1);

after this, my Magento 2.3.4 product add new product and edit product will work properly :)

How I check this error First when I click on edit and add I only get 500 error but after I uncomment the line in app/bootstrap.php will see an error.

ini_set('display_errors', 1);
0

I had the same issue. The problem is, that attributes are missing from the attribute set "Default".

I had to add these attributes to group "Schedule Design Update":

  • custom_design
  • custom_design_from
  • custom_design_to
  • custom_layout

Then I reindexed and it worked.

php bin/magento indexer:reindex
0

In the eave_attribute table, try to guarantee that the frontent_input of created_by is not null!

0

It might be the issue with parent class you are extending to render the attribute in your form or grid.

  1. If you are adding renderer to grid column, the renderer class should extend

\Magento\Ui\Component\Listing\Columns\Column

  1. If you are adding renderer to form field, the renderer class should extend:

Magento\Ui\Component\Form\Field

However, the issue seems very old but I am posting it here as it could help to someone, I spent hour or two to know about the issue when I was in same situation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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