ubertheme / module-ubdatamigration

This is a module for Magento 2. This allow migrate data from Magento 1.x to Magento 2.x
https://www.ubertheme.com/magento-extensions-2-x/magento-2-data-migration-pro?utm_source=github&utm_medium=repo&utm_campaign=magento_migration_ce
48 stars 37 forks source link

Step 2 error on multi website setup. #15

Open asmedberg opened 8 years ago

asmedberg commented 8 years ago

I have a multi website setup and can't get passed step 2 when I select all websites. Migrating from 1.9.2.3 to 2.0.2 fresh install.

CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'. The SQL statement executed was: INSERT INTO `store_website` (`sort_order`, `default_group_id`, `is_default`, `website_id`, `code`, `name`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5)

C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\yii\db\CDbCommand.php(358)

346         {
347             if($this->_connection->enableProfiling)
348                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
349 
350             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
351             $message=$e->getMessage();
352             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
353                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
354 
355             if(YII_DEBUG)
356                 $message.='. The SQL statement executed was: '.$this->getText().$par;
357 
358             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
359                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
360         }
361     }
362 
363     /**
364      * Executes the SQL statement and returns query result.
365      * This method is for executing an SQL query that returns result set.
366      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
367      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
368      * them in this way can improve the performance. Note that if you pass parameters in this way,
369      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
370      * Please also note that all values are treated as strings in this case, if you need them to be handled as
Stack Trace
#0  
+  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\yii\db\ar\CActiveRecord.php(1080): CDbCommand->execute()
#1  
+  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\yii\db\ar\CActiveRecord.php(809): CActiveRecord->insert(null)
#2  
–  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\protected\controllers\MigrateController.php(266): CActiveRecord->save()
261                             $website2->name = $website->name;
262                             $website2->sort_order = $website->sort_order;
263                             $website2->default_group_id = $website->default_group_id;
264                             $website2->is_default = $website->is_default;
265 
266                             if ($website2->save()) {
267                                 //update to log
268                                 $migrated_website_ids[] = $website->website_id;
269 
270                                 if ($store_group_ids && isset($store_group_ids[$website->website_id])) {
271                                     //Migrate store group of this website
#3  
+  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\yii\web\actions\CInlineAction.php(49): MigrateController->actionStep2()
#4  
+  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\yii\web\CController.php(308): CInlineAction->runWithParams(array())
#5  
+  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\yii\web\CController.php(286): CController->runAction(CInlineAction)
#6  
+  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\yii\web\CController.php(265): CController->runActionWithFilters(CInlineAction, array())
#7  
+  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\yii\web\CWebApplication.php(282): CController->run("step2")
#8  
+  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\yii\web\CWebApplication.php(141): CWebApplication->runController("migrate/step2")
#9  
+  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\yii\base\CApplication.php(184): CWebApplication->processRequest()
#10 
–  C:\wamp\www\moso\magento2_data_migration-0.1.25\magento2_data_migration-0.1.25\index.php(13): CApplication->run()
08 
09 //remove the following line when in production mode
10 defined('YII_DEBUG') or define('YII_DEBUG', true);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2016-02-04 18:17:02 Apache/2.4.9 (Win64) PHP/5.5.12 Yii Framework/1.1.16
comunidademagento commented 8 years ago

Hello My Friend,

Try this ...

sudo apt-get install sqlite php5-sqlite service apache2 restart

asmedberg commented 8 years ago

I'm using WAMP Server and sqlite 3 is indeed loaded. A bit more info: I have 5 websites but I only get this error when all 5 websites are selected. If I leave one specific website unchecked, I can get passed this step but then run into future problems.

quynhvv commented 8 years ago

@asmedberg : Thanks for working around this tool, hope it could help you some way. Sorry, this tool was not released version to working with Magento 2.0.2. We are working on this.

As data migration itself is a complex task as it relates to different factors including the server condition etc., we do provide migration custom service. Just add a note here, in case you might want to use our service. https://www.ubertheme.com/magento-custom-services/

Regards, Mall.

nomuprive commented 8 years ago

Hi. Thanks for the tool.

Was able to install the tool and connect the databases (Database settings). But when I click on "Next Step" to go to "Migrate Website/ Stores, it takes me directly to the new Magento website with no options continue the migration. Any tricks?

Thanks!

quynhvv commented 8 years ago

Hi williambize, Thanks for working around this tool. Can you show me any screenshot about the issue as you said?

Also, please note that: As data migration itself is a complex task as it relates to different factors including the server condition etc., we do provide migration custom service. Just add a note here, in case you might want to use our service. https://www.ubertheme.com/magento-custom-services/

Regards, Mall.

ITIStudios commented 8 years ago

I just read (after installing the tool) that it doesn't work yet for magento 2.0.2 Do you know when it might be ready for 2.0.2? Glen

ITIStudios commented 8 years ago

I uninstalled my 2.02 version and installed 2.0.1 I get the same results in the admin, a 404 not found when I click on your upgrade link. My web server is nginx. Will it wok on a nginx server? Glen

quynhvv commented 8 years ago

Hi ITIStudios, Thank you working around with this tool. Let's use the Apache server for this tool. We haven't yet tested this tool with Nginx server. Regards, Mall.