Skip to content

Undefined offset: 11 in vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 651 #824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kisfelix opened this issue Jun 12, 2020 · 9 comments

Comments

@kisfelix
Copy link

Preconditions

  1. Magento 1.9.3.8, Magento 2.3.5-p1
  2. PHP 7.3.8, MySQL 5.7

Steps to reproduce

  1. run migrate:data -a [config.xml]

Actual result

$ php bin/magento migrate:data -a [ABS PATH]/app/code/Vendor/Migration/etc/opensource-to-opensource/1.9.3.8/config.xml

[2020-06-12 04:56:31][INFO][mode: data][stage: integrity check][step: Data Integrity Step]: started
[2020-06-12 04:56:31][INFO][mode: data][stage: integrity check][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 04:56:31][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 04:56:31][WARNING]: Source fields are not mapped. Document: customer_entity. Fields: mp_cc_is_approved
[2020-06-12 04:56:31][INFO][mode: data][stage: integrity check][step: Map Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 04:56:34][WARNING]: Source documents are not mapped: ajaxzoom360,ajaxzoom360set,ajaxzoomproducts,amasty_ampreorder_order_item_preorder,amasty_ampreorder_order_preorder,amasty_orderstatus_status,amasty_orderstatus_status_template,amasty_stockstatus_history,amasty_stockstatus_quantityranges,sashas_callforprice_product,tm_core_module
[2020-06-12 04:56:34][WARNING]: Source fields are not mapped. Document: sales_flat_order_item. Fields: backorder_estimate
[2020-06-12 04:56:34][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
[2020-06-12 04:56:34][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
[2020-06-12 04:56:34][INFO][mode: data][stage: integrity check][step: Log Step]: started
[2020-06-12 04:56:34][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
[2020-06-12 04:56:34][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
[2020-06-12 04:56:34][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
[2020-06-12 04:56:34][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
[2020-06-12 04:56:34][INFO][mode: data][stage: integrity check][step: Inventory Step]: started
[2020-06-12 04:56:34][INFO][mode: data][stage: setup triggers][step: Stage]: started
[2020-06-12 04:56:34][INFO][mode: data][stage: data migration][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
In ErrorHandler.php line 61:

Notice: Undefined offset: 11 in [ABS PATH]/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 651

migrate:data [-r|--reset] [-a|--auto] [--]

*** If the EAV step is skipped, the migration actually worked sans all the attribute data.

@m2-assistant
Copy link

m2-assistant bot commented Jun 12, 2020

Hi @kisfelix. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


@m2-assistant
Copy link

m2-assistant bot commented Jun 12, 2020

Hi @kisfelix! 👋
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.

@victor-v-rad
Copy link
Collaborator

victor-v-rad commented Jun 12, 2020

Hi @kisfelix

I comitted a fix 46c1d11 for EAV step into 2.3-develop branch Please try it and see if it helps

@kisfelix
Copy link
Author

Thanks @victor-v-rad, I have applied the branch and tried again. Still no luck though.

$ php bin/magento migrate:data -a [ABS PATH]/app/code/Vendor/Migration/etc/opensource-to-opensource/1.9.3.8/config.xml

[2020-06-12 21:09:34][INFO][mode: data][stage: integrity check][step: Data Integrity Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:39][INFO][mode: data][stage: integrity check][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:39][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:39][WARNING]: Source fields are not mapped. Document: customer_entity. Fields: mp_cc_is_approved
[2020-06-12 21:09:39][INFO][mode: data][stage: integrity check][step: Map Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:42][WARNING]: Source documents are not mapped: ajaxzoom360,ajaxzoom360set,ajaxzoomproducts,amasty_ampreorder_order_item_preorder,amasty_ampreorder_order_preorder,amasty_orderstatus_status,amasty_orderstatus_status_template,amasty_stockstatus_history,amasty_stockstatus_quantityranges,sashas_callforprice_product,tm_core_module
[2020-06-12 21:09:42][WARNING]: Source fields are not mapped. Document: sales_flat_order_item. Fields: backorder_estimate
[2020-06-12 21:09:42][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:42][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:42][INFO][mode: data][stage: integrity check][step: Log Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:42][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:42][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:42][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:42][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:42][INFO][mode: data][stage: integrity check][step: Inventory Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:42][INFO][mode: data][stage: setup triggers][step: Stage]: started
100% [============================] Remaining Time: < 1 sec
[2020-06-12 21:09:44][INFO][mode: data][stage: data migration][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
In ErrorHandler.php line 61:

Notice: Undefined offset: 11 in [ABS PATH]/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 652

migrate:data [-r|--reset] [-a|--auto] [--]

Is there any other details you will need from me?

@ChameleonDevil
Copy link

I would suggest you restart migration for migrate:data from scratch similar to what I stated here #813

Follow those steps to ensure you have correctly restarted, I do not think --reset works correctly at eav step!

@kisfelix
Copy link
Author

@ChameleonDevil thanks for the suggestion, however, I already followed your original guide right from the first time I ran into the error. I can certainly get the migration done by ignoring the EAV step completely, but no one wants that.

@mobweb
Copy link

mobweb commented Jul 14, 2020

I have the same issue and I was unfortunately also unable to fix it by switching to the 2.3-develop branch.

Looking at my eav_entity_type table it seems that there are 30 entity types, but the IDs are not incremental, number 19 and 22 are missing for me. The migration tool seems to have an issue with that.

@kanevbg
Copy link

kanevbg commented Aug 29, 2020

Hi @kisfelix

I comitted a fix 46c1d11 for EAV step into 2.3-develop branch Please try it and see if it helps

@victor-v-rad Using the 2.3-develop branch (as of today) resolved the issue for me.

@mobweb
Copy link

mobweb commented Sep 16, 2021

Still having this issue on 2.4, was not able to solve it by using the Develop branch, but I figured out a manual solution for me.

The issue was that some DB entries were referencing an entity type ID that no longer existed. To fix this, I used the following queries:

DELETE FROM `eav_attribute_set` WHERE `entity_type_id` NOT IN (SELECT `entity_type_id` FROM `eav_entity_type`)
DELETE FROM `eav_attribute` WHERE `entity_type_id` NOT IN (SELECT `entity_type_id` FROM `eav_entity_type`)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants