Commerce and related modules cannot uninstall on my site.

Enabled Commerce Modules (including this one)
Ran a migration from UC rc2 -> Commerce
Disabled the Commerce modules
Enabled UC modules again
Disable UC/Enable Commerce
Fields exist error
Deleted tables from database by hand
Reinstalled Commerce Modules
Did not create tables correctly
Cannot uninstall several modules now because of Fatal Errors

This module's fatal error:

Fatal error: Class 'DynamicMigration' not found in /var/www/html/el/eldorain.com/sites/all/modules/commerce_migrate/commerce_migrate_ubercart/product.inc on line 10

I can either just delete the module from my server and move on, but then I will probably never be able to use this module again. But I cannot uninstall several other Commerce modules until this one is uninstalled correctly.

Comments

RKS’s picture

BTW I did follow http://drupal.org/node/1007434 on installing/uninstalling Commerce modules

rfay’s picture

This is about uninstalling migrate, not Commerce modules.

You disabled Migrate before uninstalling Commerce Migrate Ubercart... Is it possible not to do that? Should be.

bojanz’s picture

I guess Migrate & Commerce Migrate were disabled at the same time, and when Commerce Migrate Ubercart started uninstalling itself, Migrate was already gone.
Should that even be possible?

rfay’s picture

Title: Fatal Error on uninstall 'DynamicMigration' not found on line 10 commerce_migrate_ubercart/product.inc » Commerce Migrate Ubercart uninstall requires Migrate to be enabled

It's a pretty standard problem, although maybe we can figure out how to solve it.

You can disable anything and its dependencies. Then if the *uninstall* of one of those things magically needs a class in one of its dependencies, but that dependency is disabled, you get these fatals.

The solution in this case is pretty easy: Enable Migrate, disable commerce_migrate_ubercart and commerce_migrate, uninstall whatever you want, then disable and uninstall migrate if you want to.

RKS’s picture

I think this is a D7 problem and not a problem for this module. The reason i referenced the above link is because MigrateCommerceUbercart is dependent on commerce, therefor, according to the instructions in question, Commerce needs to be enabled to uninstall MigrateCommerce. Adding in the requirement of keeping migrate enabled was the step I missed and since I haven't needed to uninstall any of my modules until running into a slew of problems with Commerce related modules, I didn't know about the fails D7 causes when disabling the wrong modules before uninstalling others.

So that is where the issue was. I didn't connect the dependency on Migrate and only connected the dependency on Commerce when trying to uninstall. You can close this issue but I will leave that up to you in case you have something else you want to do with it.

Thanks for pointing out my oversight. I already rolled my database back to an earlier backup but I will remember this in the future. I'll probably just roll my db back in the future anyway when needing to disable/uninstall Commerce modules since it takes me about an hour to click through all the dependencies!

rfay’s picture

Project: Commerce Migrate » Commerce Migrate Ubercart
Component: Commerce Migrate Ubercart » Code
Priority: Critical » Normal
etron770’s picture

I had the same problem
I enabled Migrate and Commerce Migrate again and I was able to uninstall Commerce Migrate Ubercart

DamienMcKenna’s picture

Maybe this should be a documentation task, to add a note to the README.txt file / project page?

DamienMcKenna’s picture

FYI I also had to enable commerce_migrate in order to uninstall commerce_migrate_ubercart.

Anonymous’s picture

Version: 7.x-1.x-dev » 7.x-2.0
Issue summary: View changes
Status: Active » Closed (works as designed)

This is just how Drupal works... I checked the 7.x-2.x branch and it correctly defines all the dependencies mentioned here so it shouldn't be possible to uninstall those other modules until you have removed this one. If it is possible then it is a core bug. Maybe 7.x-1.x didn't declare all the dependencies?