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

Created on 11 August 2020, almost 5 years ago
Updated 27 October 2023, over 1 year ago

Hi all,

In my page, a have a view with a form where I show users, and if they are enabled or disabled(their state), and I give the option to change it. I mean, in the form, I can select/deselect a user(s). When a user(or users)is selected, I can choose an action that will be taken over it(enable or disable, options), and I press a button to make this changes. Using Drupal core 8.9.2 version it was working ok. Since I've updated the core version to 8.9.3, it is not working anymore. I get this error:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=117&op=do_nojs&op=do
StatusText: 500 Service unavailable (with message)
ResponseText: The website encountered an unexpected error. Please try again later.

And in the error report page(Error report) I can see:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 150 of /var/www/stage-community/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php)

And the message in the Watchdog table is:
a:6:{s:5:"%type";s:57:"Drupal\Component\Plugin\Exception\PluginNotFoundException";s:8:"@message";s:34:"The "" entity type does not exist.";s:9:"%function";s:53:"Drupal\Core\Entity\EntityTypeManager->getDefinition()";s:5:"%file";s:78:"/var/www/stage-community/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php";s:5:"%line";i:150;s:17:"@backtrace_string";s:4733:"#0 /var/www/stage-community/web/modules/contrib/group/group.module(246): Drupal\Core\Entity\EntityTypeManager->getDefinition(NULL)
#1 /var/www/stage-community/web/modules/contrib/group/group.module(260): group_query_entity_query_alter(Object(Drupal\Core\Database\Driver\mysql\Select))
#2 /var/www/stage-community/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(539): group_query_views_entity_query_alter(Object(Drupal\Core\Database\Driver\mysql\Select), NULL, NULL)
#3 /var/www/stage-community/web/core/lib/Drupal/Core/Database/Query/Select.php(480): Drupal\Core\Extension\ModuleHandler->alter('query', Object(Drupal\Core\Database\Driver\mysql\Select))
#4 /var/www/stage-community/web/core/modules/views/src/Plugin/views/query/Sql.php(1491): Drupal\Core\Database\Query\Select->preExecute()
#5 /var/www/stage-community/web/modules/contrib/views_bulk_operations/src/Service/ViewsBulkOperationsActionProcessor.php(348): Drupal\views\Plugin\views\query\Sql->execute(Object(Drupal\views\ViewExecutable))
#6 /var/www/stage-community/web/modules/contrib/views_bulk_operations/src/ViewsBulkOperationsBatch.php(120): Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionProcessor->populateQueue(Array, Array)
#7 /var/www/stage-community/web/core/includes/batch.inc(295): Drupal\views_bulk_operations\ViewsBulkOperationsBatch::operation(Array, Array)
#8 /var/www/stage-community/web/core/includes/batch.inc(137): _batch_process()
#9 /var/www/stage-community/web/core/includes/batch.inc(93): _batch_do()
#10 /var/www/stage-community/web/core/modules/system/src/Controller/BatchController.php(55): _batch_page(Object(Symfony\Component\HttpFoundation\Request))
#11 [internal function]: Drupal\system\Controller\BatchController->batchPage(Object(Symfony\Component\HttpFoundation\Request))
#12 /var/www/stage-community/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#13 /var/www/stage-community/web/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#14 /var/www/stage-community/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#15 /var/www/stage-community/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#16 /var/www/stage-community/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#17 /var/www/stage-community/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#18 /var/www/stage-community/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/stage-community/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/stage-community/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/stage-community/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/stage-community/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/stage-community/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/stage-community/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/stage-community/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/stage-community/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#27 {main}";}

I have no clue what the problem could be... Can you help me please?

💬 Support request
Status

Closed: duplicate

Version

8.9 ⚰️

Component
Other 

Last updated 1 day ago

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.

  • 🇬🇧United Kingdom scott_euser

    In case it helps someone else, we are having this issue due to cache.bin.discovery using apcu cache on Cloudways. We are working with them to understand why their cache is not cleared properly.

    According to ApcuBackend::getAll()

    APCu is a memory cache, shared across all server processes. To prevent cache item clashes with other applications/installations, every cache item is prefixed with a unique string for this site. Therefore, functions like apcu_clear_cache() cannot be used, and instead, a list of all cache items belonging to this application need to be retrieved through this method instead.

    Perhaps this tidbit of info helps someone else.

  • After reading through the hints here, I've simply cleared the cache and it worked again.

Production build 0.71.5 2024