Skip to content

Custom product attribute groups empty when migrating from 1.9.2.2 to 2.4.3 #888

@schnere

Description

@schnere

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:

if ($sourceKey == $destinationKey) {

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions