Skip to content

Undefined offset: 141 in /vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 813 #599

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

Closed
routbiplab opened this issue Oct 9, 2018 · 6 comments
Labels

Comments

@routbiplab
Copy link

routbiplab commented Oct 9, 2018

Preconditions

  1. Magento 1.7.0.2
  2. Magento 2.2.5
  3. Data Migration Tool v2.2.5

Steps to reproduce

  1. Run settings migration (success)
  2. Run data migration

Expected result

  1. Migration completed

Actual result

  1. Undefined offset: 141 in /vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 813
@routbiplab routbiplab changed the title Undefined offset: 141 in /var/www/vhosts/dev.magento2.handmadeshoes.com/htdocs/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 819 Undefined offset: 141 in /vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 819 Oct 9, 2018
@victor-v-rad
Copy link
Collaborator

Hi @routbiplab

This line 819? It points to curly bracket

@routbiplab routbiplab changed the title Undefined offset: 141 in /vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 819 Undefined offset: 141 in /vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 813 Oct 11, 2018
@routbiplab
Copy link
Author

routbiplab commented Oct 11, 2018

My bad. It should be 813

@bohdanchumak
Copy link

In the case if somebody is looking for solution.

There is a record with attribute_id 141 in M2 database catalog_eav_attribute table that is missing in M2 database eav_attribute table. Most likely something related to M2 third-party extension.

The solution is to simply delete record with attribute_id 141 from catalog_eav_attribute table.

@victor-v-rad
Copy link
Collaborator

Hi @bohdanchumak
What code or name does attribute_id 141 have?

@bohdanchumak
Copy link

Hi @victor-v-rad
in my case it was different attribute_id but same error.
Its name was amgiftcard and it was missing in eav_attribute table. So I suppose this issue is not reproducible with clean M2 installation without third-party modules.

@ejsexton82
Copy link

I'm just posting in case anyone else encounters this issue:

Notice: Undefined offset: 180 in /app/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 817

I encountered this error when I had orphaned records in catalog_eav_attribute in my destination database (not source database). The parent records in eav_attribute had been deleted. I'm not sure when this occurred, but I'm guessing it happened when we removed an extension that was not functioning properly.

I was able to correct the issue by running the following queries on my destination database:

USE destination;
SET SQL_SAFE_UPDATES = 0;
DELETE FROM catalog_eav_attribute WHERE attribute_id NOT IN (SELECT attribute_id FROM eav_attribute);
DELETE FROM eav_entity_attribute WHERE attribute_id NOT IN (SELECT attribute_id FROM eav_attribute);
SET SQL_SAFE_UPDATES = 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants