When I try to uninstall the "Commerce license" module, the following error appears :

drupal module:uninstall commerce_license

[ERROR] SQLSTATE[42S02]: Base table or view not found: 1146 Table                                                      
         'www.domaine.com.mg433jdr_commerce_license__license_role' doesn't exist: UPDATE                                
         {commerce_license__license_role} SET deleted=:db_update_placeholder_0                                          
         WHERE bundle = :db_condition_placeholder_0; Array                                                              
             [:db_update_placeholder_0] => 1                                                                            
             [:db_condition_placeholder_0] => role                                                                      

I do not know what to do. How to uninstall this module ?

Thank you


The solution for this, is a quite similar response for this question: Manually disable a module take a look. Hope that helps.

  • Thanks, is there a way to do this cleanly ? How to recreate the missing tables ? I have installed composer and console.
    – ZenImagine
    Aug 25 '17 at 23:02

Where condition occurs, once you know no other module would be effected, after a DB backup, you may fix this simply temporarily skipping validation with

  public function validate($module) {

    return ;

inside web/core/modules/field/src/FieldUninstallValidator.php

Once your module is uninstalled, remove that return; absolutely crucial for an healthy site.


Uninstall module using drush with the command:
drush pmu commerce_license -y

  • Thank you i do this with console and it does not work
    – ZenImagine
    Aug 30 '17 at 10:29
  • What error do you get there? Aug 30 '17 at 11:33
  • Everything is in the question
    – ZenImagine
    Aug 30 '17 at 11:47
  • Ok. So, I ll consider that you are getting the same error on drush console. Aug 30 '17 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.