0

I am trying to uninstall the commerce modules.

I had purchased a template with the commerce modules and using the files with demo data from them. I have contacted the template provider and he has clarified the issue is not with the template and it is with the module.

I am uninstalling the modules one by one and I also flushed all cache in between each uninstall.

I have also deleted all views, blocks and data under commerce such as orders, products before uninstalling the modules.

I can uninstall all commerce modules except Commerce, Commerce Price, Commerce Store and Commerce Product.

Whenever I try uninstalling Commerce Product, it does not complete for some reason. I only get

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Component\Plugin\Exception\PluginNotFoundException</em>: The "commerce_product" entity type does not exist. in <em class="placeholder">Drupal\Core\Entity\EntityTypeManager->getDefinition()</em> (line <em class="placeholder">133</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/EntityTypeManager.php</em>). <pre class="backtrace">flag_views_data_alter(Array, NULL, NULL) (Line: 501)
Drupal\Core\Extension\ModuleHandler->alter('views_data', Array) (Line: 254)
Drupal\views\ViewsData->getData() (Line: 162)
Drupal\views\ViewsData->get('block_content') (Line: 91)
Drupal\views\Plugin\Derivative\ViewsEntityRow->getDerivativeDefinitions(Array) (Line: 101)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 283)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 174)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 22)
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('entity:node') (Line: 16)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('entity:node', Array) (Line: 84)
Drupal\Component\Plugin\PluginManagerBase->createInstance('entity:node') (Line: 818)
Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('row') (Line: 122)
Drupal\views\Plugin\views\style\StylePluginBase->init(Object, Object, Array) (Line: 821)
Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('style') (Line: 883)
Drupal\views\ViewExecutable->initStyle() (Line: 1840)
Drupal\views\ViewExecutable->getTitle() (Line: 132)
Drupal\views\Plugin\views\display\PathPluginBase->getRoute('blog', 'page') (Line: 220)
Drupal\views\Plugin\views\display\PathPluginBase->collectRoutes(Object) (Line: 120)
Drupal\views\EventSubscriber\RouteSubscriber->routes()
call_user_func(Array) (Line: 146)
Drupal\Core\Routing\RouteBuilder->rebuild() (Line: 83)
Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() (Line: 477)
Drupal\Core\Extension\ModuleInstaller->uninstall(Array, 1) (Line: 91)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array) (Line: 160)
Drupal\system\Form\ModulesUninstallConfirmForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 585)
Drupal\Core\Form\FormBuilder->processForm('system_modules_uninstall_confirm_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('system_modules_uninstall_confirm_form', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 576)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 153)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 657)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
</pre>

and I can no longer access the website.

Can some one explain the cause of the error to me?

Natraj
  • 1
  • 1
  • Try running Cron first –  Dec 26 '17 at 13:15
  • Thanks for the response. I have did that. The issue is still the same. My guess is that some view/block from the module is not getting deleting when I uninstall it. So when front-end loads it is throwing this error. – Natraj Dec 27 '17 at 06:32

1 Answers1

1

It seems like the theme is dependent on the commerce module, so you have to check theme, there might be some views that rendered directly in the theme and now you have deleted the module so that view does not getting the product entity. you have to enable it.

Chandraveer
  • 161
  • 1
  • 9
  • Thanks. I am unsure which views is being used by the theme. It there a way I can find that from the error log? – Natraj Dec 28 '17 at 12:26
  • I have asked the template provider about this, he says its the issue with the module. This the response I got from him "It's not necessary to manually remove all content before removing the module, because each module should provide a link to remove the content which must be removed before uninstall process". How come the view causing this issue not getting deleted while uninstalling? – Natraj Dec 28 '17 at 12:49
  • There are a plugin or view or block, that still require "commerce_product" entity, and it is not found. This is the reason of this error, so I think you miss the process. – Chandraveer Dec 29 '17 at 10:42
  • The provider altered some views which depend on the Product entity. If you look at the line "The "commerce_product" entity type does not exist." it's happening after Views alter. The theme or whatever it is isn't checking if the entity type exists. – Matt Glaman Jan 05 '19 at 21:40