-
Notifications
You must be signed in to change notification settings - Fork 197
Undefined index: 1-Default in Migration\Step\Eav\Data on line 624 #825
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
Comments
Hi @p810. Thank you for your report. Please, add a comment to assign the issue:
|
Hi @p810! 👋 |
I'm welcome to feedback for the fix I just pushed at #826. I personally haven't had any trouble with the migration since applying this patch, but I opted to fallback to the destination field key in case there are scenarios where the source key should be preferred. I think that maybe the case for custom attribute sets. Assigning a new key to the map is done when an attribute set is known to be one of the default sets - I think I put that in the right conditional but let me know if not! |
@p810, I wish I knew, but I am so confused with this migration-tool's results at the moment. Later on when I started investigating my products, they started showing out of stock, more specifically configurable products. In this issue I asked why the older versions of Step\Eav\Data are so vastly different to older versions, see (#812) . I never really got any answers, especially concerning was I am still having issues with migration, at the moment trying to solve 'out of stock issue for configurables'... and investigating it just gives so many confusing results. For instance In source M1 database : 55 results - 55 combinations of attribute sets to I just wish the processor did not ignore attribute sets and their details to think it is for the best. I now have configurable products and their associated simples that can not be matched when Magento runs this query on product page of configurable:
It only returns the configurable row, and not the Now it seems I have 100000's of attribute_group to To be honest, I am at a loss with how M1-to-M2 EAV attribute migration will ever be successful in my case. |
@magento add to contributors team |
See the initial comment above. Just adding my name to the contributor's team in case it's necessary as I noticed I missed that before. |
Hi @p810 Sorry for the late reply. Since the recently, reported issues in this project are supported mainly by Magento community. But your PR contribution is very welcome! Thank you! When migrate using DMT 2.3.5, Migrated_ attribute sets should not exist because this #627 functionality was implemented. Please take a look at dfd8a6e handler \Migration\Handler\AddPrefix was removed from map file. Check that your map-eav.xml does not contain this handler. Your Magento 1 attribute sets should not have Migration_ prefix after migration |
@victor-v-rad No problem, thanks for the reply! It looks like that took care of it - we must've missed that when we updated the config initially. I will close the pull request since this isn't a bug. Thanks again! |
I have got the problem in another function: Preconditions:
It works with the following patch, but I did not check if it causes further issues.
|
Preconditions
Foo_Migration
is used to map custom attributes, tables, etc.The contents of
eav_attribute_set
for the source database are as follows:And the contents of the same table in our destination database are:
Steps to reproduce
Run the data migration with the following:
Expected result
Actual result
An exception is thrown from
Migration\Step\Eav\Data::createMapAttributeSetIds()
on line 624, complaining about an undefined index:Additional notes
From stepping through the debugger, it looks like this method is called from
Migration\Step\Eav\Data::migrateAttributeSets()
, which is responsible for:eav_attribute_set
in the destination databaseDefault
toMigration_Default
for each entity typecreateMapAttributeSetIds()
to do some mapping beforeperform()
advances to the next taskBy the time that
createMapAttributeSetIds()
is called, the update has already taken place and the attribute sets have been renamed. Because this latest version of the migration tool made it so only theMigration_Default
sets are saved in the database (unlike 2.3.4 and lower which kept the original attribute set names as well) the call toMigration\Step\Eav\Helper::getDestinationRecords()
is going to return an array that lacks the necessary keys for the mapping, e.g.1-Default
. It will only have keys like1-Migration_Default
.The error occurs between lines 623 and 624, when an attempt is made to get an array with the row's data by using a key that's assembled by concatenating the entity type ID and attribute set name (e.g.,
1-Default
):$newAttributeSet
will then be null and the mapping on subsequent lines can't be done.Potential solution
I'm looking into a solution whereby an additional mapping is done, which points the dynamic source key to the corresponding row in
Migration\Step\Eav\Data::$newAttributeSets
. I haven't tested this yet so I don't know if this will be the right data thatMigration\Step\Eav\Data::$mapAttributeSetIdsDestOldNew
andMigration\Step\Eav\Data::$defaultAttributeSetIds
, but it looks like it is. If this works I'll submit a PR.The text was updated successfully, but these errors were encountered: