Closed quienti closed 8 years ago
Hi @quienti It is hard to figure out what wrong with your eav_attribute_group and eav_entity_attribute. You could share your DB dump of the next Magento 1 tables: eav_attribute_group eav_attribute_set eav_attribute eav_entity_attribute catalog_eav_attribute customer_eav_attribute eav_entity_type You can send it through the email (find it in my profile https://github.com/victor-v-rad) We will try to migrate it.
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.
But I am getting an error as "undefined offset 13". 13 - it is a "Default" attribute set ID of "order_item" entity type. It falls, when is trying to move "price" attribute to "product-details" group. However "order_item" entity type attributes are not assigned to any attribute group. I think the fix is: do not move such attributes into "product-details" group. Just to change the condition to:
if ($attributes[$attributeId]['attribute_code'] == $attributeCode && isset($attributeSetGroups[$record->getValue('attribute_set_id')][$attributeGroupCode]) ) { $record->setValue( 'attribute_group_id', $attributeSetGroups[$record->getValue('attribute_set_id')][$attributeGroupCode] ); }
Sh****. Now I get SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '9' for key 'PRIMARY'
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: [ERROR]: Class catalog/product_attribute_backend_finishdate does not exist but mentioned in: eav_attribute.backend_model for attribute_id=63
@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! Thanks
Btw, SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '9' for key 'PRIMARY' error is thrown, when a rollback is being run. So, rollback does not work in case, when some error occurs.
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:
catalog_category
catalog_product
creditmemo
customer
customer_address
invoice
order
shipment
)
then the tool throws an exception, that "Duplicate entry '9'". In our table we have a lot of old entity types, such as "order_item", "invoice_item", etc + we have a custom entity type: "m_filter" from ManaDev extension. Therefore the migration tool would always throw an exception in my case. I have resolved it by deleting all entity types, except entity types from the list above.
This entity type's ID is hardcoded in the Migration tool's helper as "9"
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, I have same issue. Notice: Undefined offset: 1 in {PROJECT_PATH}/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 433
Magento 1 => 1.9.2.2 Magento 2 => 2.1.0 Data Migration Tool => 2.1.0
Hi @baltechies, Undefined offset 1 in Data.php line 433 is usually a secondary error. Please empty your Magento2 database, Migrate settings. Then Migrate data using the -vvv flag and post:
Hi @rtowings ,
I have tried it many time and now did it again but same error.
1) Error
[Exception]
Notice: Undefined offset: 1 in /Users/balvinderSingh/Sites/comitstore-mg2/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Dat
a.php on line 433
2) First two lines Exception trace: () at /Users/balvinderSingh/Sites/comitstore-mg2/vendor/magento/framework/App/ErrorHandler.php:61 Magento\Framework\App\ErrorHandler->handler() at /Users/balvinderSingh/Sites/comitstore-mg2/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:433 Migration\Step\Eav\Data->moveAttributeToGroup() at /Users/balvinderSingh/Sites/comitstore-mg2/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:400
I have attached the screenshot of terminal.
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: 1) add the missing records to eav_attribute_set in your M1 database. 2) delete the extra records from eav_attribute_group in your M1 database - I dislike this option, because there is risk in destroying data, but it should work. (make sure you backup first!) 3) wait for an update in the migration tool that might look for this issue and take appropriate action.
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] Hi @baltechies.
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: 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); If this query yields 0 rows, then we need to look elsewhere for your problem.
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 installed fresh copy of magento 2.1 and run migration on this. But same issue nothing change.
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. I installed a fresh copy of magento 2.0.7 and data migration tool version 2.0.7. Then I am able to migrate magento1 database into magento2. Now I am facing is a new issue, I am unable to edit and add new product, Its showing empty screen. Can you please suggest related to this?
@quienti The issue was fixed in the latest release of the tool 2.1.1 Please recheck
@victor-v-rad Thank you, I will check in a few days
@victor-v-red I am able to migrate data from magento 1 to magento 2.1 with data migration tool 2.1.1. But I faced some issues, Like 1) products and categories are not shown on frontend. 2) In admin panel, category page (Product-> categories) throwing exception error. Error is a:4:{i:0;s:139:"Notice: Undefined offset: 564 in [Magento_PATH]/vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php on line 166";i:1;s:6828:"#0
@baltechies Not able to identify the cause. You could send your DB dump (remove all passwords in it before). See my email in my profile https://github.com/victor-v-rad I would try to migrate and test
Thank you @baltechies for the DB you sent Migrated successfully and the issues you described are exist. In order to solve it I need new issue in github please make it and Copy/Past your last comment
@victor-v-rad I have created a new issue #153
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 You could share DB dump (remove all passwords before) of Magento 1 and send it through email (find it in my profile https://github.com/victor-v-rad) We will try to migrate it to reproduce and fix
I am stuck since 3 days trying to migrate my magento 1 to magento 2. I keep on getting below error:
[PDOException] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '136' for key 'PRIMARY'
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]
Notice: Undefined offset: 1 in ../../../magento2/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 209
Second run I get [PDOException]
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME'
I am not sure how to fix pass this issue, has anyone got a solution please share. thank's.
[Exception]
Notice: Undefined offset: 19 in /home/bestalzheimers/public_html/newbestalzheimers/vendor/magento/data-migration-tool/src/Migration/Step/Ea
v/Data.php on line 249
Magento 1 => 1.9.1.0 Magento 2 => 2.1.2 Data Migration Tool => 2.1.2
i am trying to migrate 1.7.0.2 to 2.1.7
[Exception] Notice: Undefined offset: 19 in /home/m2/public_html/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 278
I don't know how to fix it
@natsoGR did you find any fix for it? I am getting the exactly same error.
@manojroka unfortunately no.
Magento 1 => 1.9.2.2 Magento 2 => 2.1.0 Data Migration Tool => 2.1.0
After try reset :