magento / magento/data-migration-tool
Custom product attribute groups empty when migrating from 1.9.2.2 to 2.4.3
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 339
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Description
When migrating from Magento 1.9.2.2 to 2.4.3 the custom product attribute group mapping does not work as expected.
This error causes the custom attribute groups to be empty after migration.
### Preconditions
* Source Magento 1.9.2.2
* Target: Magento 2.4.3-p1
* PHP 7.4
* A custom module Foo_Migration is used to map custom attributes, tables, etc.
### Steps to reproduce
1. Starting with Magento 1.9.2.2 having an attribute set with custom attribute groups with attributes assigned
2. Migrate data to Magento 2.4.3
3. The custom attribute group has no attributes assigned
### Expected result
After migration the custom product attribute group should have the same product attributes assigned as in source Magento.
### Actual result
The custom product attribute groups are empty.
### Additional notes
I found the problem here:
https://github.com/magento/data-migration-tool/blob/ea9cc9f21d3634dd3695fd88f9c869d9535cb6a6/src/Migration/Step/Eav/Data.php#L697
If I have a group "MyCustomGroup" in Source it get's compared with "Migration_MyCustomGroup". This will never be true as the source lacks of the Prefix. As the mapping is not set here it will not be executed later.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/Migration/Step/Eav/Data.php around line 697 and compare the source custom group name with the prefixed target name during mapping. Reproduce the migration from Magento 1.9.2.2 to 2.4.3 with a custom attribute group, then verify that the migrated group contains the same product attributes as the source.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100