Discussions

ubercart > commerce migration issue

Both here and on the commerce guys screencast, I'm told I'm supposed to delete all product types, but I didn't understand. I kept trying to delete ubercart product content types. I needed to delete commerce created product product types.

Base info here: http://www.commerceguys.com/resources/articles/215

This was the error I was getting:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: [...]/batch?id=351&op=do StatusText: Service unavailable (with message) ResponseText: MigrateException: No migration found with machine name CommerceMigrateUbercartProductProduct in MigrationBase::getInstance() (line 427 of [...]/sites/all/modules/migrate/includes/base.inc).

I have a D7 site with ubercart, upgraded from D6. All the tutorials explain that it's easier to use the kickstart and migrate from a different db, but that ignores the pain of importing or recreating content, views, taxonomies, etc, so I'm trying to upgrade from the same db.

My assumed workflow and questions for migrating from the same database:

1. Install commerce, other modules required by commerce, migrate, and commerce migrate (don't install sample data, or delete it in step 4 if you do)
2. Enable the modules from step 1
3. Navigate to Store > Products then click on the Product Types tab
( /admin/commerce/products/types )
4. Delete product product types created by Commerce (I had only one)
5. Check Commerce Migrate settings. Default settings seemed good for a migration from the same db.
6. Run the migration steps in order, from top to bottom
7. Disable all ubercart modules (takes maybe a half dozen cycles to get them all)
8. Use the uninstall tab to uninstall ubercart modules (also takes multiple cycles)
9. Delete ubercart from /sites/all/modules
10. Disable migrate and commerce migrate modules (multiple cycles)
11. Delete migrate and commerce migrate from /sites/all/modules

I ended up with over a dozen tables in my db called migrate_map_commerce[...] and migrate_message_commerce[...] I don't know If I can delete these now, or if there was a way to do it through the GUI before I deleted the migrate module.

Now I have no content types for my views to reference. You're supposed to make a content type called Product Display. I think I have several headaches ahead of me, possibly using Commerce Bulk Product Creation. Is there any way of having the migration process take care of this?

Posted: Jan 28, 2012

Comments

rfay Randy Fay on January 28, 2012

Glad you got this going.

When you uninstall Commerce Migrate and Migrate, you'll get rid of the extra tables.

I don't really recommend migrating from the same database because of the messiness, so you just have to figure out what you can. After uninstalling Ubercart, you *should* be rid of the ubercart modules.

The "Product display" does create product display nodes, if you did that migration.

Per your request I did edit [the tutorial post](http://www.commerceguys.com/resources/articles/215) to try to make it more obvious that you need to delete all orders, line items, products, and product types before beginning - please take a look. I also updated the README.txt - you can follow the link there to see the new version. The commit to change that was in http://drupalcode.org/project/commerce_migrate.git/blobdiff/d99a4a640577...

Glad you had some success!

crab on March 28, 2012

Im getting the same problem..
migrating from seperate DB tho..

I have tried migrating from
Drupal 6 ubercart
Drupal 7 ubercart...

I have made sure there is no product type in the commerce install..
both migrations fail on the line item import.

would custom content types (CCK) cause this.. I have a couple of products which are different content types..

update: Ive used node convert on my drupal7 ubercart insatll to change those products to a standard product content type. Im still getting the following error when doing the line import:

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /commerce_kickstart-7.x-1.4/batch?id=52&op=do StatusText: Service unavailable (with message) ResponseText: MigrateException: No migration found with machine name CommerceMigrateUbercartProductProduct in MigrationBase::getInstance() (line 441 of /public_html/com/commerce_kickstart-7.x-1.4/sites/all/modules/migrate/includes/base.inc).

and when doing the product type import:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'product' for key 'PRIMARY': INSERT INTO {commerce_product_type} (type, name, description, help, revision) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => product [:db_insert_placeholder_1] => Product [:db_insert_placeholder_2] => A basic Product [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => 1 ) (/public_html/com/commerce_kickstart-7.x-1.4/includes/common.inc:6975)
Processed 1 (0 created, 0 updated, 1 failed, 0 ignored) in 0 sec (4414/min) - done with 'CommerceMigrateUbercartProductType'

ideas?