Skip to content

Notice: Undefined offset: 9 in /var/www/html/test/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data. php on line 555 #301

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
grayrattus opened this issue May 16, 2017 · 5 comments

Comments

@grayrattus
Copy link

I have tried to migrate data from Magento 1.9.1.0 to Magento 2.1.6 but i get fallowing error:

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

And here is entire migration proces with -vvv option.

    root@vps:/var/www/html/test# php bin/magento migrate:settings -vvv /var/www/html/test/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.1.0/config.xml
    
    [2017-05-16 10:31:27][INFO][mode: settings][stage: integrity check][step: Settings Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:31:27][INFO][mode: settings][stage: integrity check][step: Stores Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:31:27][INFO][mode: settings][stage: data migration][step: Settings Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:31:28][INFO][mode: settings][stage: data migration][step: Stores Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:31:28][INFO][mode: settings][stage: volume check][step: Stores Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:31:28][INFO][mode: settings][stage: volume check][step: Stores Step]: Migration completed
    
    root@vps:/var/www/html/test# php bin/magento migrate:data -vvv /var/www/html/test/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.1.0/config.xml
    
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: Data Integrity Step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: EAV Step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: Map Step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: Log Step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: setup triggers][step: Stage]: started
    [2017-05-16 10:31:43][INFO][mode: data][stage: data migration][step: EAV Step]: started
    100% [============================] Remaining Time: 1 sec
    
                                                                                                                                         
      [Exception]                                                                                                                        
      Notice: Undefined offset: 9 in /var/www/html/test/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.  
      php on line 555                                                                                                                    
                                                                                                                                         
    
    
    Exception trace:
     () at /var/www/html/test/vendor/magento/framework/App/ErrorHandler.php:61
     Magento\Framework\App\ErrorHandler->handler() at /var/www/html/test/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:555
     Migration\Step\Eav\Data->moveProductAttributeToGroup() at /var/www/html/test/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:515
     Migration\Step\Eav\Data->moveProductAttributes() at /var/www/html/test/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:500
     Migration\Step\Eav\Data->migrateEntityAttributes() at /var/www/html/test/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:185
     Migration\Step\Eav\Data->perform() at /var/www/html/test/vendor/magento/data-migration-tool/src/Migration/Mode/AbstractMode.php:73
     Migration\Mode\AbstractMode->runStage() at /var/www/html/test/vendor/magento/data-migration-tool/src/Migration/Mode/Data.php:116
     Migration\Mode\Data->runData() at /var/www/html/test/vendor/magento/data-migration-tool/src/Migration/Mode/Data.php:68
     Migration\Mode\Data->run() at /var/www/html/test/vendor/magento/data-migration-tool/src/Migration/Console/MigrateDataCommand.php:51
     Migration\Console\MigrateDataCommand->execute() at /var/www/html/test/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
     Symfony\Component\Console\Command\Command->run() at /var/www/html/test/vendor/symfony/console/Symfony/Component/Console/Application.php:874
     Symfony\Component\Console\Application->doRunCommand() at /var/www/html/test/vendor/symfony/console/Symfony/Component/Console/Application.php:195
     Symfony\Component\Console\Application->doRun() at /var/www/html/test/vendor/magento/framework/Console/Cli.php:96
     Magento\Framework\Console\Cli->doRun() at /var/www/html/test/vendor/symfony/console/Symfony/Component/Console/Application.php:126
     Symfony\Component\Console\Application->run() at /var/www/html/test/bin/magento:23
    
    
    migrate:data [-r|--reset] config

After running script again the error changed to:

      [PDOException]                                                                                                                     
      SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYP  
      E_ID_ATTRIBUTE_SET_NAME'        

But as I read on the internet it's caused by using migration tool again on this same database. Anyway I atached it. Maybe it helps.

FullError:

    root@vps:/var/www/html/test# php bin/magento migrate:data -rvvv /var/www/html/test/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.1.0/config.xml
    Reset the current position of migration to start from the beginning
    
    [2017-05-16 10:53:04][INFO][mode: data][stage: integrity check][step: Data Integrity Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:04][INFO][mode: data][stage: integrity check][step: EAV Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:04][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:04][INFO][mode: data][stage: integrity check][step: Map Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:06][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:06][INFO][mode: data][stage: integrity check][step: Log Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:06][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:06][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:06][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:06][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:06][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:06][INFO][mode: data][stage: setup triggers][step: Stage]: started
    100% [============================] Remaining Time: 1 sec
    [2017-05-16 10:53:12][INFO][mode: data][stage: data migration][step: EAV Step]: started
    28% [========>-------------------] Remaining Time: 1 sec 
    
                                                                                                                                         
    

  [PDOException]                                                                                                                     
      SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYP  
      E_ID_ATTRIBUTE_SET_NAME'       
    
    migrate:data [-r|--reset] config

I tried solution from: #112 but it's not working.

Has anyone run into similiar problem and know how to solve it?

@iPholix
Copy link

iPholix commented May 27, 2017

I have the same problem.
I have tried to migrate data from Magento 1.9.1.1 to Magento 2.1.6 but i get fallowing error:

[Exception]
Notice: Undefined offset: 12 in /var/www/html/magento2/clear/vendor/magento/data-migration-too
l/src/Migration/Step/Eav/Data.php on line 555

Magento 2 freshly installed and clean.
thank you friends!

@victor-v-rad
Copy link
Collaborator

victor-v-rad commented May 29, 2017

Hi @iPholix

As a workaround you can try to remove/comment these two lines 515, 516 and after migration in admin panel move manually attribute price into product-details group and shipment_type into bundle-items group in the all attribute sets

@iPholix
Copy link

iPholix commented May 29, 2017

Hello, @victor-v-rad
Now we have this message:

[PDOException]
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-1'
for key 'EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID'

When use the command with "-R"

php bin/magento migrate:data -r /var/www/html/magento2/clear/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.1.1/config.xml

We see this message:

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

When I use the Fresh new databases in Magento 1 and Magento 2, see this:
[PDOException]
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '12-7
1' for key 'EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID'

@pdenissen
Copy link

pdenissen commented Aug 22, 2017

Hi Victor-v-rad,

After removing the lines you've mentioned above, i'm getting the next error.

Notice: Undefined offset: 19 in /private/var/www/higainguitars2/data/web/magento2/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on l
  ine 278

The complete error message with -vvv is:

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


migrate:data [-r|--reset] config

@LucasMali
Copy link

Having the same issue.

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

5 participants