Open sahilrtpl opened 3 years ago
Hi @sahilrtpl. 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
Hi @sahilrtpl Please try 2.3-develop branch of DMT. The issue you have could be fixed there
I'm having the same issue, the only difference is that I'm importing from Magento 1.9.4.1. I tried using 2.3-develop and still get the same error. I was migrating fine when on 2.3.3.
I was able to finish running the data migration tool after removing the conflicting records in the M2 database. The table was eav_attribute_group. Run the migration then remove all rows that match the attribute_set_id, you might have to run the migration a few times and re-delete some records to get all the attribute set ids.
EDIT: After a little looking around I found that this causes issues down the road. Some custom product attribute sets and data where not migrated.
I had two things working against me. I had setup code in M2 to add all my custom attributes and attribute sets/groups, that needed to be commented out. Also adding the changes from 2.3-develop allowed a good migration.
Having the same issues. Duplicate entry '110-prijskaart-winkel' for key 'EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_CODE
.
But the old magento1 database only has 1 entry for this. So why the duplicate entry error?
Ok, this is happening but I don't know why. 2 inserts:
INSERT INTO `eav_attribute_group` (`attribute_group_id`, `attribute_set_id`, `attribute_group_name`, `sort_order`, `default_id`, `attribute_group_code`, `tab_group_code`) VALUES (?, ?, ?, ?, ?, ?, ?)
(
[attribute_group_id] =>
[attribute_set_id] => 110
[attribute_group_name] => Prijskaart winkel
[sort_order] => 109
[default_id] => 0
[attribute_group_code] => prijskaart-winkel
[tab_group_code] => basic
)
INSERT INTO `eav_attribute_group` (`attribute_group_id`, `attribute_set_id`, `attribute_group_name`, `sort_order`, `default_id`, `attribute_group_code`, `tab_group_code`) VALUES (?, ?, ?, ?, ?, ?, ?)
(
[attribute_group_id] =>
[attribute_set_id] => 110
[attribute_group_name] => Prijskaart Winkel
[sort_order] => 109
[default_id] => 0
[attribute_group_code] => prijskaart-winkel
[tab_group_code] => basic
)
``
Notice the difference with `Prijskaart Winkel` and `Prijskaart winkel`. Why is this attribute group being inserted twice?
So, 1 is coming from createProductAttributeSetStructures
The other from migrateAttributeGroups
I was running migration multiple times but I forgot to remove the extra attribute groups from the default attribute set before restarting the migration again.
Hi @PascalBrouwers, how did you fix this? I'm having the same issue (migrating from 1.9.4.5 > 2.4.1), but removing the extra attribute groups didn't work for me.
Preconditions
Steps to reproduce
Expected result
1.Data Migration completed successfully
Actual result
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '9-Images' for key 'EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_G
ROUP_NAME'