Clearing Cache breaks site
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3273683. -->
Reported by: [troybthompson](https://www.drupal.org/user/183560)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Upon clearing all caches all pages except update.php would give me a white screen with the following error:</p>
<pre>The website encountered an unexpected error. Please try again later.<br><br>Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 143 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).<br>Drupal\Core\Entity\EntityTypeManager->getHandler() (Line: 196)<br>Drupal\Core\Entity\EntityTypeManager->getStorage() (Line: 21)<br>menu_entity_index_entity_extra_field_info()<br>call_user_func_array() (Line: 403)<br>Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 657)<br>Drupal\Core\Entity\EntityFieldManager->getExtraFields() (Line: 160)<br>Drupal\Core\Entity\EntityDisplayBase->init() (Line: 143)<br>Drupal\Core\Entity\EntityDisplayBase->__construct() (Line: 176)<br>Drupal\Core\Entity\Entity\EntityViewDisplay->__construct() (Line: 456)<br>Drupal\Core\Entity\EntityStorageBase->mapFromStorageRecords() (Line: 182)<br>Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple() (Line: 346)<br>Drupal\Core\Entity\EntityStorageBase->loadMultiple() (Line: 116)<br>Drupal\Core\Entity\Entity\EntityViewDisplay::collectRenderDisplays() (Line: 281)<br>Drupal\Core\Entity\EntityViewBuilder->buildMultiple() (Line: 239)<br>Drupal\Core\Entity\EntityViewBuilder->build()<br>call_user_func_array() (Line: 101)<br>Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 772)<br>Drupal\Core\Render\Renderer->doCallback() (Line: 363)<br>Drupal\Core\Render\Renderer->doRender() (Line: 201)<br>Drupal\Core\Render\Renderer->render() (Line: 241)<br>Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 564)<br>Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 242)<br>Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 132)<br>Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)<br>Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()<br>call_user_func() (Line: 142)<br>Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 163)<br>Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 80)<br>Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)<br>Drupal\Core\StackMiddleware\Session->handle() (Line: 48)<br>Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)<br>Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)<br>Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)<br>Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)<br>Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)<br>Stack\StackedHttpKernel->handle() (Line: 708)<br>Drupal\Core\DrupalKernel->handle() (Line: 19)</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>After a lot of database restores and disabling modules I tracked it down to this one. I had indexing turned on for the main menu and for Content, URL alias, Redirect and was using views with a node relationship to the menu and sorting by menu weight. I'm guessing that it has having issues indexing on cache rebuild, though. Unfortunately I won't be able to test further for a few days but wanted to post this before I go in case it helps others.</p>
<p>I'm running Drupal 9.3.9</p>
issue