Skip to content

migration fail Notice: Undefined offset: 1 in data-migration-tool/src/Migration/Step/Eav/Data.php on line 266 #227

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
fventurini opened this issue Jan 26, 2017 · 9 comments

Comments

@fventurini
Copy link

[Exception]
Notice: Undefined offset: 1 in /var/www/html/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 266

Tried every bulk_size in config.xml
what else can I try?

thanks
Francesco

root@devshopmiracle:/var/www/html/bin# ./magento --reset -vvv migrate:data ../vendor/magento/data-migration-tool/etc/ce-to-ce/1.8.0.0/config.xml
Reset the current position of migration to start from the beginning

[2017-01-26 18:25:56][INFO][mode: data][stage: integrity check][step: Data Integrity Step]: started
[2017-01-26 18:26:18][INFO][mode: data][stage: integrity check][step: EAV Step]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:18][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:18][INFO][mode: data][stage: integrity check][step: Map Step]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:28][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:28][INFO][mode: data][stage: integrity check][step: Log Step]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:28][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:28][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:29][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:29][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:29][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:29][INFO][mode: data][stage: setup triggers][step: Stage]: started
100% [============================] Remaining Time: 1 sec
[2017-01-26 18:26:32][INFO][mode: data][stage: data migration][step: EAV Step]: started
42% [============>---------------] Remaining Time: 1 sec


  [Exception]
  Notice: Undefined offset: 1 in /var/www/html/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 266



Exception trace:
 () at /var/www/html/vendor/magento/framework/App/ErrorHandler.php:61
 Magento\Framework\App\ErrorHandler->handler() at /var/www/html/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:266
 Migration\Step\Eav\Data->migrateAttributeSetsAndGroups() at /var/www/html/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:164
 Migration\Step\Eav\Data->perform() at /var/www/html/vendor/magento/data-migration-tool/src/Migration/Mode/AbstractMode.php:73
 Migration\Mode\AbstractMode->runStage() at /var/www/html/vendor/magento/data-migration-tool/src/Migration/Mode/Data.php:116
 Migration\Mode\Data->runData() at /var/www/html/vendor/magento/data-migration-tool/src/Migration/Mode/Data.php:68
 Migration\Mode\Data->run() at /var/www/html/vendor/magento/data-migration-tool/src/Migration/Console/MigrateDataCommand.php:51
 Migration\Console\MigrateDataCommand->execute() at /var/www/html/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/magento/framework/Console/Cli.php:96
 Magento\Framework\Console\Cli->doRun() at /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /var/www/html/bin/magento:23


migrate:data [-r|--reset] config
@victor-v-rad
Copy link
Collaborator

Hi @fventurini

This #209 report looks quite similar. I assume you got the error because you disabled <integrity>Migration\Step\DataIntegrity\Integrity</integrity> in your config.xml and not resolved "Orphan records" in your Magento 1 DB

@fventurini
Copy link
Author

You are right. I have to take db backup first of every data migration for eventual restore.
Now I am trying with fresh new mag2.1 and going to resolve furter problems.
Thanks

@nareshphp1
Copy link

Facing the same issue as

[Exception]
Notice: Undefined offset: 1 in /home/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 291

Exception trace:
() at /home/vendor/magento/framework/App/ErrorHandler.php:61
Magento\Framework\App\ErrorHandler->handler() at /home/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:291
Migration\Step\Eav\Data->migrateAttributeSetsAndGroups() at /home/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:189
Migration\Step\Eav\Data->perform() at /home/vendor/magento/data-migration-tool/src/Migration/Mode/AbstractMode.php:73
Migration\Mode\AbstractMode->runStage() at /home/vendor/magento/data-migration-tool/src/Migration/Mode/Data.php:116
Migration\Mode\Data->runData() at /home/vendor/magento/data-migration-tool/src/Migration/Mode/Data.php:68
Migration\Mode\Data->run() at /home/vendor/magento/data-migration-tool/src/Migration/Console/MigrateDataCommand.php:51
Migration\Console\MigrateDataCommand->execute() at /home/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at /home/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at /home/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at /home/vendor/magento/framework/Console/Cli.php:96
Magento\Framework\Console\Cli->doRun() at /home/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at /home/bin/magento:23

@fwolfst
Copy link

fwolfst commented Aug 29, 2017

This happens when you re-try a migration (i.e. because the first attempt failed). I am yet searching for a solution to "reset" the db, as @victor-v-rad suggested. For me, I do not want to start with a fresh 2.x db because we already did quite some configuration.
Insight 1 Changing the prefix in map-eav.xml did change the error message to "offset 19" :)
Insight 2 Truncating relevant (?) tables as in http://blog.titechnologies.in/magento-2-x-how-to-clear-test-data-before-production/ lead me to the next error - I believe the original issue is resolved.

@jafar247commerce
Copy link

@fwolfst ,
Any fixes found? I am also facing the same issue

@terms999
Copy link

any update on this issue? I am facing the same.

@jafar247commerce
Copy link

@terms999 , no, still i didn't get any solution for this, one possible way is, need to restore the database then start migration again, it may help you, for me its resloved

@pjayramkumar
Copy link
Member

I face this issue when i see "Class not found /Migration/Handler/EavAttribute/ConvertConfigurableAttribute" error during the migration.

To solve this i created the file and get the source from git repo of data migration tool 2.2 version

after that you need to import the fresh copy of database in destination site.

flush the cache and run the migration command from start.

@jloreto
Copy link

jloreto commented May 13, 2020

Greetings, I had a similar error but on line 492,
always use reset migrate: data -r
  and when it reaches this point the databases have already been modified. I had my backup and towards restoration.

I went to the line and ignored the Notice Exception with @

                $record['attribute_group_id'] = @$this->mapAttributeGroupIdsSourceDest[$record['attribute_group_id']];
                if($record['attribute_group_id']!==FALSE) {

Then all fine work

Regarding, need to restore the database then start migration again, I think that here https://oyenetwork.com/articles/data-migration-to-magento2-case-study/ worked differently, they did things like:

- 'INSERT INTO% s (% s) VALUES% s',
+ 'INSERT IGNORE INTO% s (% s) VALUES% s',

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

No branches or pull requests

8 participants