magento / data-migration-tool

Magento Data Migration Tool
https://devdocs.magento.com/guides/v2.3/migration/bk-migration-guide.html
Open Software License 3.0
336 stars 200 forks source link

Getting error when edit the configurable product on Magento 2.2.4 after migration #527

Closed srinivasnovamodule closed 6 years ago

srinivasnovamodule commented 6 years ago

Hi There,

Last week we have migrated the data from Magento 1 (Version 1.9.3.0) to Magento 2.2.4. After completion of migration, all configurable products edit section is getting an error as below.

**1 exception(s): Exception #0 (Exception): Warning: Illegal offset type in isset or empty in /var/www/vhosts/mysite.com/vendor/magento/module-ui/Config/Reader/Definition/Data.php on line 126

Exception #0 (Exception): Warning: Illegal offset type in isset or empty in /var/www/vhosts/mysite.com/vendor/magento/module-ui/Config/Reader/Definition/Data.php on line 126

0 /var/www/vhosts/mysite.com/vendor/magento/module-ui/Config/Reader/Definition/Data.php(126): Magento\Framework\App\ErrorHandler->handler(2, 'Illegal offset ...', '/var/www/vhosts...', 126, Array)

1 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Element/UiComponentFactory.php(390): Magento\Ui\Config\Reader\Definition\Data->get(Array)

2 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Element/UiComponentFactory.php(404): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)

3 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Element/UiComponentFactory.php(313): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)

4 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Element/UiComponentFactory.php(216): Magento\Framework\View\Element\UiComponentFactory->mergeMetadata('product_form', Array, false)

5 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Layout/Generator/UiComponent.php(135): Magento\Framework\View\Element\UiComponentFactory->create('product_form', NULL, Array)

6 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Layout/Generator/UiComponent.php(97): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'product_form', Array, Object(Magento\Framework\View\Layout\Interceptor))

7 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Layout/GeneratorPool.php(80): Magento\Framework\View\Layout\Generator\UiComponent->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))

8 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Layout.php(344): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))

9 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout->generateElements()

10 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()

11 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()

12 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Layout.php(254): Magento\Framework\View\Layout\Builder->build()

13 /var/www/vhosts/mysite.com/vendor/magento/framework/View/Layout.php(875): Magento\Framework\View\Layout->build()

14 /var/www/vhosts/mysite.com/vendor/magento/module-backend/Model/View/Result/Page.php(26): Magento\Framework\View\Layout->getBlock('menu')

15 /var/www/vhosts/mysite.com/vendor/magento/module-catalog/Controller/Adminhtml/Product/Edit.php(69): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Catalog...')

16 /var/www/vhosts/mysite.com/vendor/magento/framework/App/Action/Action.php(107): Magento\Catalog\Controller\Adminhtml\Product\Edit->execute()

17 /var/www/vhosts/mysite.com/vendor/magento/module-backend/App/AbstractAction.php(229): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

18 /var/www/vhosts/mysite.com/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))

19 /var/www/vhosts/mysite.com/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->___callParent('dispatch', Array)

20 /var/www/vhosts/mysite.com/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

21 /var/www/vhosts/mysite.com/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

22 /var/www/vhosts/mysite.com/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

23 /var/www/vhosts/mysite.com/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Edit/Interceptor.php(26): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->___callPlugins('dispatch', Array, NULL)

24 /var/www/vhosts/mysite.com/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

25 /var/www/vhosts/mysite.com/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

26 /var/www/vhosts/mysite.com/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

27 /var/www/vhosts/mysite.com/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

28 /var/www/vhosts/mysite.com/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)

29 /var/www/vhosts/mysite.com/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

30 /var/www/vhosts/mysite.com/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()

31 /var/www/vhosts/mysite.com/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))**

Preconditions Magento 2 version: 2.2.4 PHP version: 7.1.17 Mysql: Maria DB 10 Apache

Expected Result We should able to edit configurable product after the migration but get an error instead. But it is working with simple products.

Actual result screenshot_3

Could you please help on this as I am trying to fix this issue since last week but not yet fixed? Please, advice or suggestions on this issue.

Thanks

srinivasnovamodule commented 6 years ago

Even I have tried to create a new configurable product and it is giving the same error. I am not able to create new conf prod also. Please, advice or suggestion.

victor-v-rad commented 6 years ago

It can happen when during migration "Data Integrity Step" show errors (about founded orphan records) and they were not processed properly and just suppressed by --autooption, which allow continuing migration of these orphan records.

srinivasnovamodule commented 6 years ago

Thanks, @victor-v-rad for responding on this. How can we fix this issue? Is there something we can update/delete some data in the database. Please suggest on this as we are still not able to fix this issue. Please advice. Thanks

srinivasnovamodule commented 6 years ago

@victor-v-rad I have fixed all the errors that showed by data migration tool except customer attribute field. And I ran the data migration command using --auto option to skip/ignore customer attribute field and migration completed successfully.

migration_pv

And I ran the commands cache: clean and cache: flush and then went to the admin section and opened configurable product in edit mode. Getting the same error as above listed in the description.

Please advice or help on this issue. I have tried to fix but there is no luck. Please help on this as we are facing this issue for two weeks.

victor-v-rad commented 6 years ago

Hi @srinivasnovamodule

Have you resolved your issue? I cannot reproduce it on my local env. But if your DB is not big you can sent a link for downloading it to me (find my email in my profile https://github.com/victor-v-rad and remove passwords from DB if it is necessary) and I will try to migrate and see if error occur.

srinivasnovamodule commented 6 years ago

Thanks @victor-v-rad for looking into this. Actually, there is an issue with the third-party (Amasty color swatches pro M2) plugin. When it is installed the admin edit conf product section working as expected. If we disabled for some reason the admin edit conf product section is not working. We have removed this extension completely and remigrated the data from M1 to M2 again then it is working as expected.

Thanks for your words that you are ready to help with this.

srinivasnovamodule commented 6 years ago

I am closing this issue as this is not related data migration issue. :-)

hayatbiralem commented 5 years ago

Hi guys,

I had the same problem and I just fixed by deleting some sequence definitions in my own custom extensions' module.xml

It seems we should pay more attention to that sequence/dependency definitions.

PascalBrouwers commented 4 years ago

I had this issue too because of an attribute set group 'Configurable' in Magento1. Had to run this query to fix it:

update magento.eav_attribute_group set attribute_group_name = 'Configurable Options', attribute_group_code = 'configurable-options' where attribute_group_name like '%configur%';

Otherwise the component loads 'configurations' and 'configurable' in the same item, causing it to be an array instead of a string.