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 comesIf 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 solutionHot-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
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
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!