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

The Power of Social Commerce: Real-Life Case Studies

As an ecommerce business owner, I've always been intrigued by the power of social media and its potential to boost sales. Social commerce, the integration of social media and ecommerce, has emerged as a game-changer in the industry. It allows businesses to reach and engage with their target audience on

Read more

2024 Sustainable eCommerce Growth: Key Trends Shaping Eco-Friendly Online Shopping

‍‍ In recent years, the concept of sustainability has become increasingly important in various industries, and e-commerce is no exception. Sustainable e-commerce refers to the practice of conducting online business operations in an environmentally friendly and socially responsible manner. This article will delve into the emerging trends in sustainable e-commerce, highlighting

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