Magento migration issue. Can't edit a product in admin panel Illegal offset type in isset or empty

Magento migration issue. Can't edit a product in admin panel Illegal offset type in isset or empty

The error and the solution of the problem have been obtained as a result of migration from Magento 1 (1.9. *) To Magento 2 (2.3.5-p1), but also can be after updating Magento, for example from version 2.2.7 to version 2.3.2.

Main causes:
  • - Migration from M1 to M2
  • - Update M2

How to reproduce

Go to the admin panel, try to open any product for editing or viewing, you get an error message


Warning: Illegal offset type in isset or empty in /vendor/magento/module-ui/Config/Reader/Definition/Data.php on line 126

How to debug

Open the file vendor/magento/module-ui/Config/Reader/Definition/Data.php line 126

From the description of the function, it is clear that $key - there must be a string, but an array comes

If debugging $key you can see something like ['fieldset', 'fieldset'] (if that I do not use php xdebug, it's a long time :-) )

What's the solution

Hot-fix

it works, but don't do it, never :-)

But, you need to do this in order to understand what has changed in the admin panel. After the hotfix, editing the product became possible, but the name of one attribute group became [object] but it must be "Configurable"

Need more information about the data - find the reason. Go to the class below and add logging $data


\Magento\Framework\View\Element\UiComponentFactory.php

log -> Debug information

Most likely we have several components - groups with the same code.
Let's open the eav_attribute_group table - it stores information about the groups in which the attributes are stored

Perform a search
Feel free to use our Services

The picture shows that we have 2 groups with the same code

What should be done

Make attribute_group_name unique. I changed configurable -> configurable


The problem is solved!
Other Articles

Case Study: How we shifted 78%+ of B2B Orders to Self-Service in 5 Months Using a Custom B2B Portal

About the Client The client is a globally operating industrial manufacturer specializing in high-precision pumping systems and fluid-handling equipment. The company serves more than 24,000 active B2B customers across manufacturing, chemical processing, food production, and engineering industries. With decades of market presence, the client is recognized for engineering excellence,

Read more

How We Scaled B2B eCommerce Without Rebuilding the Website

From Manual PIM and Email Quotes to Scalable B2B eCommerce in 2 months, without fuss and within budget * e-Commerce integration without rebuilding the existing TYPO3 website * Automated product and pricing updates from PIM (no more manual maintenance) * Real-time or near real-time stock synchronization * Tiered / quantity-based pricing visible to customers as

Read more
Beyond Code – We Build Experiences: Dive Into a Realm Where Every Line of Code Crafts a Story

We don't just code; we breathe life into your digital aspirations. Our expertise in coding is complemented by our design approach and strategic marketing initiatives, ensuring your brand not only looks good but performs exceptionally.

Begin Your Story