-
Notifications
You must be signed in to change notification settings - Fork 197
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
Undefined offset: 9 in /vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 433 #112
Comments
Hi @quienti |
Mail sent and thank you for your response |
internal issue MAGETWO-55303 was created |
i'm facing the same problem. Can you post what caused this issue and how to fix? Thanks alot! |
We are working on this issue. Most probably you have different eav_entity_type.entity_type_id in your Magento 1 and Magento 2 |
Ha Ha! I am getting the same error, when migrating from CE 1.9.2.1 to EE 2.1. |
Sh****. Now I get |
I just ran into this one as well. (1.8.0.1 -> 2.1.0) @andreymoskvenkov The first answer gives a little more context on the second error you received: http://magento.stackexchange.com/questions/92578/data-migration-eav-step-error I don't have a solid solution at the moment. |
I think the issue appears, when we have a project, which was initially implemented on some older Magento version and then upgraded many times to the latest version. I have another project on my local, which is on CE 1.9.2.1 as well, but I don't see attributes for "order", "order_item", "invoice", etc entity types in the "eav_attribute" table. Therefore for now I think the solution for me would be: just to delete all attributes from "eav_attribute" table, where entity_type_id > 4. However need to keep in mind that there may be attributes for some custom entity types, which probably should not be deleted. However in my case there I have only Magento entity types. |
Yeah, now I am getting an error related to older backend types: |
@quienti in your DB the field eav_attribute_group.attribute_group_name has French names. Rename it back to English and try migration again |
I can not try a new migration this week, but as soon as I have a few minutes, I try! |
Btw, SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '9' for key 'PRIMARY' |
Sorry, no, rollback does not work anyway, but this issue Duplicate entry '9' for key 'PRIMARY' is thrown, when Migration tool tries to insert not existing in CE edition entity type "rma_item". This entity type's ID is hardcoded in the Migration tool's helper as "9". Therefore if your eav_entity_type table contains more than 8 "standard" entity types (standard entity types are: |
internal ticket MAGETWO-55399 was created |
@victor-v-rad i have changed my file like internal issue MAGETWO-55303 but again getting same error |
@MagentoTest1111 2.1.1 release is not ready yet. It might be better to wait for a while |
Hi, Magento 1 => 1.9.2.2 |
Hi @baltechies,
|
Hi @rtowings , 2) First two lines |
Hi @baltechies, Just to be clear. Did you begin your latest attempt with an empty Magento2 database? |
Yes. I did it with empty Magento2 Database. I have the backup of magento2 database after fresh installation. |
OK, try running the following query on your Magento1 database. select distinct attribute_set_id from eav_attribute_group where attribute_set_id > 8 and attribute_set_id not in (select attribute_set_id from eav_attribute_set where entity_type_id = 4); |
I run this query on magent1 database and its return 31 rows. |
@rtowings Is there any clue? What should I do further? |
What's going on is that your Magento1 database has some missing data (or extra data, depending on your perspective). Basically, in M1 attributes are grouped into sets in the tables eav_attribute_group and eav_attribute_set. The query you ran on your M1 database returned the attribute_set_id numbers that exist in eav_attribute_group and should (but don't) exist in eav_attribute_set. This is likely due to a bug in an earlier Magento release that deleted the attribute_groups, but did not delete the corresponding sets. You have 3 choices:
I'll message you separately with some instructions. |
@rtowings Thank you. I will look into database and update you. I have checked database roughly and found that eav_attribute_set table has entry which is not exist in eav_attribute_group table. |
@rtowings All attribute_set_id numbers that exist in eav_attribute_group are also exist in eav_attribute_set. I am not capturing what is going wrong here. |
[Edited] I am concerned that there are issues with your empty M2 database. Before going any farther, I would recommend that you re-run your install (dump this new, empty M2 db for later reference), then attempt the migration into the newly created, empty M2 database. Please remember to use the -vvv flag. (You will still receive an error during the EAV step, but I think it will be slightly different); The query I had you run earlier on your M1 database [[select distinct attribute_set_id from eav_attribute_group where attribute_set_id > 8 and attribute_set_id not in (select attribute_set_id from eav_attribute_set where entity_type_id = 4);]] returns a list of attribute_set_id that DO exist in eav_attribute_group, but DO NOT exist in eav_attribute_set. To rule out sets from other entities, here is a slightly modified query to run against your M1 database that should (but may not) yield the same result: If it yields any rows, then it has found a set(s) in eav_attribute_group that doesn't exist in eav_attribute_set; |
Hi @rtowings I have run "select distinct attribute_set_id from eav_attribute_group where attribute_set_id > 8 and attribute_set_id not in (select attribute_set_id from eav_attribute_set);" and its return 0 rows. |
Please check that in your DB the field eav_attribute_group.attribute_group_name in English. |
@victor-v-rad There are 127 rows. What should I check? |
@victor-v-rad Its seems that there is an issue in data migration tool version 2.1. |
@quienti |
@victor-v-rad Thank you, I will check in a few days |
@victor-v-red
|
@baltechies |
Thank you @baltechies for the DB you sent |
@victor-v-rad |
It seems the initial issue is fixed and I close it. Feel free to reopen if it is still actual |
Just for information, my migration work correctly Thanks |
Great! |
Hi guyz, I migrated data from magento 1.9.2.4 to magento 2.1.1 and successfully completed all steps. Everything looks good and all data imported but when i go to Products->categories i am seeing this error. Notice: Undefined offset: 31 in /var/www/coral/vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php on line 166 Help much appreciated. :) |
It is hard to figure out what is wrong in your case |
I am stuck since 3 days trying to migrate my magento 1 to magento 2. [PDOException] i did reset and did reset multiple times still no success , how can i find which database has duplicate value , please help me to fix i have attached my magento 1 database also .(to you in seperate mail) |
I am also having issue with migrating from 1.9.2.1 to 2.1.0. In the first run I get [Exception] I am not sure how to fix pass this issue, has anyone got a solution please share. thank's. |
@natsoGR did you find any fix for it? I am getting the exactly same error. |
@manojroka unfortunately no. |
@natsoGR I restarted the migration process with fresh install and correct ignore documents list, It is now completed without any errors [migration 1.7.0.2 to 2.1.7]. |
Has anyone nailed down a solution for this? Seen this happen on 1.7.x=>2.1.7 and 1.9.x=>2.1.7. |
Hi Guys, I migrated data from magento 1.9.2 to magento 2.1.2 and successfully Category step. Everything looks good and all data imported but when i go to Products->categories i am facing this error. Notice: Undefined offset: 31 in /var/www/coral/vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php on line 166 How to i can fix this issue. |
Magento 1 => 1.9.2.2
Magento 2 => 2.1.0
Data Migration Tool => 2.1.0
After try reset :
The text was updated successfully, but these errors were encountered: