4

Error screenshot

I have migrated from ver 1.9 to 2.3

8 Answers 8

8

Try to look at the customer eav attribute with select value for frontend_input column in eav_attribute table, make sure the source_model column value is not null or empty or it fills with correct class. You can set value for frontend_input column to int if you wanna work on the source_model later

3
  • saved my day, thanks
    – Ashvini K
    Commented Feb 22, 2020 at 21:06
  • I love the suggestion of changing the frontend_input to int for debugging purposes. I have a custom M1 attribute that came to M2 with source_model set to NULL. Changed the frontend_input from select to int and the page works. Now I know the source of the bug and can determine how I want to migrate that data / fix it.
    – PromInc
    Commented May 19, 2020 at 15:07
  • Yes, it work, replace select with int or add source_model for these attributes
    – HaFiz Umer
    Commented Jan 20, 2021 at 11:48
1

Go to the table eav_attribute and search for attribute "mailchimp_store_view" and deleted this row after taking backup of your table. it will fix your problem. i was also facing same issue. it worked like a charm. give it a try.

1

As noted by most, this seems to involve attributes that did not cleanly migrate / has migration data issues

In my case it was an customer address attribute called 'address_valid'

A sure fire way to debug this is to just debug with a breakpoint in PHPSTorm on Magento\Eav\Model\Entity\Attribute\Source constructor

enter image description here

make a small temp edit to function definition

enter image description here

and step through until you hit the null one(s).

You can also go with a conditional (mine happen to the be first attribute calling that routine, so I had nothing to step through)

enter image description here

Look back in the trace log until you find the AbstratAttribute.php entry, and select.

enter image description here

Then check within the class data for the offending attribute data

enter image description here

0

Please run this three commands and check:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
0

After a long debug and review migrated database I found the reason

  • During migration I found that some of custom attributes were not there in migrated DB ( I don't know, Why !).

  • Another important point is we should check the options for the select type attributes( options had not been migrated in my case).

These 2 can be the possible reasons for the error.

0

I was experiencing the same issue when trying to edit customers accounts and after checking the 'eav_attribute table' using Idham Choudry's answer here, i checked the table against a working Magento (2.3.4) and found that MailChimp had an erroneous attribute which had migrated over from Magento 1.9 but is now no longer needed.

After taking a backup of the database I simply deleted the 'mailchimp_store_view' attribute from the eav_attribute table and I can now edit customers again.

Finally i re-installed Mailchimp and everything is now working perfectly again.

Hope this helps anyone with the same problem

0

I had this same issue. It turned out to be some extra entries (not columns or source model) in the "eav_customer_attribute" table. Once I removed these entries the page loaded and worked fine.

I also found that this issue caused the customers address to be saved as a new entry on every order.

0

In my case it was a plug-in attribute.

In \www\vendor\magento\module-customer\Model\AttributeMetadataResolver.php around line 116 there is the public function getAttributesMeta.

Here add a bit of debug code to find the problematic attribute:

var_dump($attribute->getAttributeCode());

Refresh the page. You should see some attribute codes printed in top of the page before the error. Its the last one that gets printed before the error. In my case it was allowed_payment_methods.

Remove the attribute from the eav_attribute table and you should be good to go.

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.