Uninstall Issue

Created on 14 July 2020, over 4 years ago
Updated 30 January 2023, almost 2 years ago

When I try to uninstall the Group module I receive an error "The website has encountered an error" and the following message in the command line:

php Error Drupal\Component\Plugin\Exception\PluginNotFoundException: The "group" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 150 of /var/www/html/web/c

I went through the module and deleted all groups, types, and associated nodes and the problem still persists.

If you try to uninstall through the UI it gives the following prompt:

The following modules will be completely uninstalled from your site, and all data from these modules will be lost!

Group
CONFIGURATION DELETIONS
The listed configuration will be deleted.

Field storage
group_content.group_roles

Any help is much appreciated!!

💬 Support request
Status

Active

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada gwvoigt London, ON 🇨🇦

    I'm having the same issue. With drush pmu group gnode I get:

    In EntityTypeManager.php line 139:
    The "group_content" entity type does not exist.

    Tried #4 suggestion with no luck

  • 🇨🇦Canada gwvoigt London, ON 🇨🇦

    I think I finally could uninstall the module with no issues. In my site, I've started with 8.x, upgraded to 2.0 then 3.0. Maybe I missed database update sor something went wrong in the update. I could uninstal after downgrading it to 2.0, and then removing the module via composer.

  • 🇨🇦Canada smulvih2 Canada 🍁

    I'm having a similar issue, happens with both 1.x and 2.x branches. When I uninstall the group module I get this error:

    Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "group_relation_type.manager". in Drupal\Component\DependencyInjection\Container->get() (line 157 of core/lib/Drupal/Component/DependencyInjection/Container.php).
    
    Drupal\group\Entity\Storage\GroupRelationshipTypeStorage::createInstance(Object, Object) (Line: 269)
    Drupal\Core\Entity\EntityTypeManager->createHandlerInstance('Drupal\group\Entity\Storage\GroupRelationshipTypeStorage', Object) (Line: 258)
    Drupal\Core\Entity\EntityTypeManager->getHandler('group_content_type', 'storage') (Line: 192)
    Drupal\Core\Entity\EntityTypeManager->getStorage('group_content_type') (Line: 99)
    Drupal\Core\Entity\EntityTypeBundleInfo->getAllBundleInfo() (Line: 80)
    Drupal\Core\Entity\EntityTypeBundleInfo->getBundleInfo('block') (Line: 103)
    Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver->getDerivativeDefinitions(Array) (Line: 101)
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 291)
    Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 181)
    Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 22)
    Drupal\Core\Plugin\DefaultPluginManager->getDefinition('field_item:string_long') (Line: 195)
    Drupal\Core\TypedData\DataDefinition->getClass() (Line: 606)
    Drupal\Core\Field\BaseFieldDefinition->getMainPropertyName() (Line: 463)
    Drupal\Core\Field\BaseFieldDefinition->setDefaultValue('') (Line: 54)
    Drupal\Core\Entity\EditorialContentEntityBase::revisionLogBaseFieldDefinitions(Object) (Line: 23)
    Drupal\Core\Entity\EditorialContentEntityBase::baseFieldDefinitions(Object) (Line: 184)
    Drupal\block_content\Entity\BlockContent::baseFieldDefinitions(Object) (Line: 231)
    Drupal\Core\Entity\EntityFieldManager->buildBaseFieldDefinitions('block_content') (Line: 196)
    Drupal\Core\Entity\EntityFieldManager->getBaseFieldDefinitions('block_content') (Line: 455)
    Drupal\Core\Entity\EntityFieldManager->getFieldStorageDefinitions('block_content') (Line: 119)
    Drupal\content_moderation\Entity\Routing\EntityModerationRouteProvider->getEntityTypeIdKeyType(Object) (Line: 97)
    Drupal\content_moderation\Entity\Routing\EntityModerationRouteProvider->getLatestVersionRoute(Object) (Line: 57)
    Drupal\content_moderation\Entity\Routing\EntityModerationRouteProvider->getRoutes(Object) (Line: 47)
    Drupal\Core\EventSubscriber\EntityRouteProviderSubscriber->onDynamicRouteEvent(Object, 'routing.route_dynamic', Object)
    call_user_func(Array, Object, 'routing.route_dynamic', Object) (Line: 142)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'routing.route_dynamic') (Line: 184)
    Drupal\Core\Routing\RouteBuilder->rebuild() (Line: 83)
    Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() (Line: 546)
    Drupal\Core\Extension\ModuleInstaller->uninstall(Array, 1) (Line: 91)
    Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array) (Line: 174)
    Drupal\system\Form\ModulesUninstallConfirmForm->submitForm(Array, Object)
    call_user_func_array(Array, Array) (Line: 114)
    Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
    Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 595)
    Drupal\Core\Form\FormBuilder->processForm('system_modules_uninstall_confirm_form', Array, Object) (Line: 323)
    Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
    Drupal\Core\Controller\FormController->getContentResult(Object, Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
    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}() (Line: 169)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

    The group module is uninstalled after this error. But when I try to visit my site I get this on all pages:

    Drupal\Component\Plugin\Exception\PluginNotFoundException: The "group_content_type" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
    
    Drupal\Core\Entity\EntityTypeManager->getHandler('group_content_type', 'storage') (Line: 192)
    Drupal\Core\Entity\EntityTypeManager->getStorage('group_content_type') (Line: 99)
    Drupal\Core\Entity\EntityTypeBundleInfo->getAllBundleInfo() (Line: 80)
    Drupal\Core\Entity\EntityTypeBundleInfo->getBundleInfo('block') (Line: 65)
    Drupal\content_moderation\ModerationInformation->isModeratedEntityType(Object) (Line: 55)
    Drupal\content_moderation\ViewsData->Drupal\content_moderation\{closure}(Object)
    array_filter(Array, Object) (Line: 56)
    Drupal\content_moderation\ViewsData->getViewsData() (Line: 16)
    content_moderation_views_data() (Line: 236)
    Drupal\views\ViewsData->Drupal\views\{closure}(Object, 'content_moderation') (Line: 405)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith('views_data', Object) (Line: 244)
    Drupal\views\ViewsData->getData() (Line: 154)
    Drupal\views\ViewsData->get('block_content') (Line: 94)
    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: 291)
    Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 181)
    Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 146)
    views_theme(Array, 'module', 'views', 'core/modules/views') (Line: 473)
    Drupal\Core\Theme\Registry->processExtension(Array, 'views', 'module', 'views', 'core/modules/views') (Line: 360)
    Drupal\Core\Theme\Registry->Drupal\Core\Theme\{closure}(Object, 'views') (Line: 405)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith('theme', Object) (Line: 361)
    Drupal\Core\Theme\Registry->build() (Line: 259)
    Drupal\Core\Theme\Registry->get() (Line: 88)
    Drupal\Core\Utility\ThemeRegistry->initializeRegistry() (Line: 69)
    Drupal\Core\Utility\ThemeRegistry->__construct('theme_registry:runtime:claro', Object, Object, Array, 1) (Line: 279)
    Drupal\Core\Theme\Registry->getRuntime() (Line: 142)
    Drupal\Core\Theme\ThemeManager->render(Array, Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
    Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
    call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

    Clearing cache fixes this error, then my site is good to use. The issue is I have a build process that imports config and tries to uninstall the group module, so this failure breaks my build process.

  • 🇨🇦Canada JayDarnell Guelph, Ontario

    I'm still seeing this issue on 3.x. Clearing the cache doesn't fix the problem. When I uninstall group my site is completely down.

    Drupal\Component\Plugin\Exception\PluginNotFoundException: The "group" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

  • 🇮🇳India rohit sankhla

    The group module v2.2 is what I'm using for Drupal site. I updated the module to version 3.3 by following the instructions. - https://www.drupal.org/docs/extending-drupal/contributed-modules/contributed-module-documentation/group/group-v2v3-guides/upgrading-from-v2-to-v3

    To complete the upgrade, I took the following actions -
    - update from v2.2 to v3.3 first, as an issue will occur if I go to v2.3 and then try to update to v3.3.
    - updated the database.
    - Exported the config.
    - At last run config import.

    Now that group v3.3 is installed on my site, but there is a problem. When I click on Extend > Uninstall, this error message appears -

    Drupal\Component\Plugin\Exception\PluginNotFoundException: The "group_content_type" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

    Where will I find this entity? I don't understand. Could someone please help me to resolve this.

  • 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium

    You probably still have a supporting module or custom code checking for the old entity type IDs, but I need the full stack trace to confirm. Also these last few comments were completely unrelated to the original report so please add your comments to an issue dedicated to the 2->3 upgrade path.

Production build 0.71.5 2024