-
Notifications
You must be signed in to change notification settings - Fork 197
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
Undefined Offset: in Migration/Step/Eav/Data.php #813
Comments
Having a very similar issue.
Destination: Clean installed Magento 2.3.5-p1; data-migration-tool 2.3.5; Previous magento versions import worked fine: Destination: Clean installed Magento 2.3.4; data-migration-tool 2.3.4; |
This is most definitely the same issue, line 492 as explained above the array does not contain an item with index 18. The method Potential fix - but read notes below Please note: |
'Undefined offset' error was fixed in ea9cc9f and merged into 2.3-develop branch |
Yeah I fixed this with a similar way on my branch. Thanks for update! Since fixing this, I am now trying to figure out why my categories do not show, Every single one of them returns error 404. Anyways topic for another day |
@ChameleonDevil Yes same issue here. products data is empty and category mapping the is there but form frontend it says "NO PRODUCT" Did you find any solution? |
I do not know if you really have the same problem I had here, but in my description I commented this: Potential fix - but read notes below This definitely fixed undefined index issues on this step, I have ran several migration items afterwards. Other failures, but not related to this issue anymore. |
This definitely fixed undefined index issues on this step, I have ran several migration items afterwards. Other failures, but not related to this issue anymore. Even my migration was completed after ea9cc9f this fix but something was affected with the attribute group in my database. the database available in the database but the relation of the product with attributes is not there, if you can help with debugging it would be appreciable. Thanks, |
Sorry just saw your message now. Glad to hear that it fixed your first issue (of many :P). This eav_attribute_group issue that you mentioned as far as I remember only occurs when you try to run What I did for myself to test and restore migrations (I have alot of other issues still not working :( ) was sort of the following:
Good luck! |
@ChameleonDevil Thank you for the guidance this step was really new and seems to be helpful. *VERY IMPORTANT: Delete the var/migration ** entries in Magento 2 folder. These files are used by the tool it seems to keep track of where you stopped previously. So since the migration does not work 100% yet, just restart from the beginning. (this might also be why you have group issues). I always delete these files. |
@ChameleonDevil I'm having the same issue with the 404 did you fix this issue? |
@estebansmith-ris , Are you referring to categories that I had issues with error 404? Then yes, but since you are in this Eav/Data.php issue thread, Im not sure what you are talking about - there are plenty of 404 issues in M2. If it is related to Categories, I am almost certain this issue I created a solution for #815 I had was related to the 404s for categories as well. (It was about two weeks ago, and since then trying to solve so many extra issues, that I can't recall.) |
I had the same issue with a migration from magento 1.9.4.5 to 2.3.5 today. This comment gave me the idea to change the name of the default product attribute set to "Default" in the magento1 database: #112 (comment) So far it seems to fix my problem. |
I am having this issue in a migration from 1.9.3.2 to 2.3.5-p1. However, I have used the develop branches fix for the 'undefined offset' error and the migration completes. However, one of my custom product attribute sets has no attribute groups assigned to it and I'm thinking that this fix is part of the reason. Is it possible that ignoring these errors is causing my attribute groups to not be imported properly? |
When you do not have that fix applied, the data migration immediately fails, so that is not an option. At the point that fix is applied in
The processing of the There is this new updated commit 4 days ago (I assume this is the one you have) : #af40def29438fb that added another new condition:
I seem to recall having this issue as well at one point where The original issue discussed here was fixed in #ea9cc9f21d3634dd3695fd88f9c869d9535cb6a6. Maybe you should revert one step commit back from the newest one and see if it changes anything? My concern with this whole Go read there, I do not even know if the current Data.php file we have are accurate - alot of processing code got removed in the commits I mention there. Also -- why is this there Finally I just want to say good luck with Eav migration - it is a nightmare when you later discover all your missing attribute data. |
@victor-v-rad I have latest code,
But Still giving me error Notice: Undefined offset: 19 in /var/www/html/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 286 What is the problem? even not found attribute_group_id is on `continue; |
I'm having the same issue, but then for category attributes. It seems that those attribute groups are never processed. Only products are being processed in createMapProductAttributeGroupIds(). |
We were also having the issue with: Notice: Undefined offset: 7 in /var/www/html/mag_new/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 492 We tried the fix mentioned above if (!isset($this->mapAttributeGroupIdsSourceDest[$record['attribute_group_id']])) { continue; } but this resulted in loss of data. Product names, descriptions etc didn't get migrated over for one of our attribute sets. In the end we noticed that the attribute set with the missing data had originally been named "Default" and had been renamed to "Clothing". We renamed it back to "Default" and removed the code fix. When we reran the migration it completed error free. I suspect you have to have an attribute set named 'Default' as per the original Magento 1 installation. Also if it helps anyone, we were migrating from 1.9.4.5 to 2.3.7-p1 but because there is no migration tool above 2.3.5 we used that instead and it seemed to work fine. Hope that helps someone Regards Mark |
Can you perhaps please send us the full Current commits (including the latest 2.4-develop) also uses So, new migrations, even though it completes, does not really have entries in Before I continue, I am just putting this here for people skipping the top issue:
@hewgim, can you please assist us here with your last reply:It would be great if you clear up this for us:
"Default" as attribute set has 8x
Each entity_type_id has its own Results set:
When you mention '"Default" had been renamed to "Clothing"', do you mean your source Magento 1 database entry was renamed to Clothing or Magento 2 destination? This is not clear from your explanation above, If it's in the source database: then I think I am out of luck since they are already called Default for all entity_type_id entries; I also don't know what to do, as we have over 120x different custom attribute sets (product attribute sets) in addition to those 8x built-in ones... Would you perhaps please give us a workflow of what you did in the source & destination database to prepare (before running migration). |
Before I continue here:
For reference, I created this topic around the same time I added this issue last year:
Why is the newer 2.3.5 Step/Eav/Data.php so much smaller #812
Edit 2021:
Please read the link above for the concern I raised:
Summary: Looking at the current commits (2021) for
Step/Eav/Data.php
it still has less code (alot old code removed.... and hard-coded quantity$this->progress->start(7);
vs OLDER commits:$this->progress->start($this->getIterationsCount());
) as previous commits I mentioned in that topic; I wondered then, and still do: is this not the reason whyStep/Eav/Data.php
processing is giving us so much issues? Why were so much attribute processing removed, why are the dynamicgetIterationsCount()
not used anymore?Original topic:
Preconditions
Steps to reproduce
composer require magento/data-migration-tool:2.3.5
setup:upgrade
4.1 Make sure that var/migration* is deleted so that you have a new migration from start. (in particular the file migration-tool-progress.lock). I would have assumed
--reset
does the same, but seems not.bin/magento migrate:data path/to/config.xml
that has configuration info from your source Magento 1 database and Magento 2 destination.Expected result
Actual result
Halts immediately on the following error
1.
$record['attribute_group_id'] = $this->mapAttributeGroupIdsSourceDest[$record['attribute_group_id']];
attribute_group_id for $record is 4, but there seems to be a missing mapAttributeGroupIdsSourceDest[4] corresponding map source/destination
In fact there seems to be more missing indexes when I debugged
Additional notes
migration-tool-progress.lock
inside var/Questions
mapAttributeGroupIdsSourceDest
with entries not missing some processing that used to be there? (See my related query above) (I have done previous migrations pre v.2.3 successfully using the same source Magento 1 database)The text was updated successfully, but these errors were encountered: