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-&gt;getDefinition() (line 143 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).<br>Drupal\Core\Entity\EntityTypeManager-&gt;getHandler() (Line: 196)<br>Drupal\Core\Entity\EntityTypeManager-&gt;getStorage() (Line: 21)<br>menu_entity_index_entity_extra_field_info()<br>call_user_func_array() (Line: 403)<br>Drupal\Core\Extension\ModuleHandler-&gt;invokeAll() (Line: 657)<br>Drupal\Core\Entity\EntityFieldManager-&gt;getExtraFields() (Line: 160)<br>Drupal\Core\Entity\EntityDisplayBase-&gt;init() (Line: 143)<br>Drupal\Core\Entity\EntityDisplayBase-&gt;__construct() (Line: 176)<br>Drupal\Core\Entity\Entity\EntityViewDisplay-&gt;__construct() (Line: 456)<br>Drupal\Core\Entity\EntityStorageBase-&gt;mapFromStorageRecords() (Line: 182)<br>Drupal\Core\Config\Entity\ConfigEntityStorage-&gt;doLoadMultiple() (Line: 346)<br>Drupal\Core\Entity\EntityStorageBase-&gt;loadMultiple() (Line: 116)<br>Drupal\Core\Entity\Entity\EntityViewDisplay::collectRenderDisplays() (Line: 281)<br>Drupal\Core\Entity\EntityViewBuilder-&gt;buildMultiple() (Line: 239)<br>Drupal\Core\Entity\EntityViewBuilder-&gt;build()<br>call_user_func_array() (Line: 101)<br>Drupal\Core\Render\Renderer-&gt;doTrustedCallback() (Line: 772)<br>Drupal\Core\Render\Renderer-&gt;doCallback() (Line: 363)<br>Drupal\Core\Render\Renderer-&gt;doRender() (Line: 201)<br>Drupal\Core\Render\Renderer-&gt;render() (Line: 241)<br>Drupal\Core\Render\MainContent\HtmlRenderer-&gt;Drupal\Core\Render\MainContent\{closure}() (Line: 564)<br>Drupal\Core\Render\Renderer-&gt;executeInRenderContext() (Line: 242)<br>Drupal\Core\Render\MainContent\HtmlRenderer-&gt;prepare() (Line: 132)<br>Drupal\Core\Render\MainContent\HtmlRenderer-&gt;renderResponse() (Line: 90)<br>Drupal\Core\EventSubscriber\MainContentViewSubscriber-&gt;onViewRenderArray()<br>call_user_func() (Line: 142)<br>Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher-&gt;dispatch() (Line: 163)<br>Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw() (Line: 80)<br>Symfony\Component\HttpKernel\HttpKernel-&gt;handle() (Line: 58)<br>Drupal\Core\StackMiddleware\Session-&gt;handle() (Line: 48)<br>Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle() (Line: 106)<br>Drupal\page_cache\StackMiddleware\PageCache-&gt;pass() (Line: 85)<br>Drupal\page_cache\StackMiddleware\PageCache-&gt;handle() (Line: 48)<br>Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle() (Line: 51)<br>Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle() (Line: 23)<br>Stack\StackedHttpKernel-&gt;handle() (Line: 708)<br>Drupal\Core\DrupalKernel-&gt;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