Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
1kenthomas CreditAttribution: 1kenthomas commentedFWIW 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
Comment #3
bojanz CreditAttribution: bojanz at Centarro commentedThere'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
Comment #5
sam452 CreditAttribution: sam452 commentedCustomer 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?