The Commerce base module can't be uninstalled together with the other modules anymore, because it now provides a field type. This is a known Drupal limitation. Instead, the flow is:
- Uninstall all other Commerce modules
- Run cron to delete the field in question
- Uninstall the Commerce base module.

We should document this.

Comments

bojanz created an issue. See original summary.

1kenthomas’s picture

FWIW here's the order I needed to use:

--Commerce Payment
--Commerce Order
--Commerce Store
--Commerce Price
( At this point: the following reason prevents Commerce from being uninstalled:Fields pending deletion)
--{run Cron}
--Commerce

bojanz’s picture

Status: Active » Fixed

There's a matching docs issue at https://github.com/drupalcommerce/commerce-docs/issues/239
Uninstall docs are ready to be merged via https://github.com/drupalcommerce/commerce-docs/pull/236

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

sam452’s picture

Customer installed new Drupal 8 which has Commerce installed with sample data in it. Great. Cloned files and dump MySQL to find that in my local there seems to be a mismatch between the config and the data it finds. Giving up on fighting that one, I am following the above to uninstall manually commerce in the customer install and hoping a new db dump will get past my hosed development install.
Attempted to click on links to empty the tables with data. Many worked.
Going through admin interface to singly uninstall commerce modules that don't have dependencies until I get to Commerce Payment which is at the beginning of this list.
Drupal crashes on localhost/drupal/admin/modules/uninstall/confirm
watchdog reports:
a:6:{s:5:"%type";s:45:"Drupal\Core\Database\DatabaseExceptionWrapper";s:8:"@message";s:338:"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal8.commerce_payment_method__card_type' doesn't exist: UPDATE {commerce_payment_method__card_type} SET deleted=credit_card
WHERE bundle = :db_condition_placeholder_0; Array( [:db_update_placeholder_0] => 1, [:db_condition_placeholder_0] => credit_card)

Do I have to rebuild these dependent tables to delete the superior tables?