This is a Drupal 9.5.10. After uninstalling the Media module. The website encountered an unexpected error. The error message only shows a little information, as I know. It mentioned the "media" entity type does not exist.
The website does not have the Media Entity module. Of course, the Media module and Media types(audio, document, image, remote video, and video) should not be there because I just uninstalled it. So what does it mean? Do you know if the error message below relates to another module besides the Media? It's hard to know what needs to be fixed. How do I fix this?
If I enable the Media module by running drush en media
, it will return the site, but I want to uninstall the Media module.
The website encountered an unexpected error. Please try again later.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "media" 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->getDefinition('media') (Line: 128)
Drupal\Core\Entity\EntityDisplayBase->__construct(Array, 'entity_view_display') (Line: 178)
Drupal\Core\Entity\Entity\EntityViewDisplay->__construct(Array, 'entity_view_display') (Line: 564)
Drupal\Core\Entity\EntityDisplayBase->__wakeup()
session_start() (Line: 192)
Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (Line: 162)
Drupal\Core\Session\SessionManager->startNow() (Line: 110)
Drupal\Core\Session\SessionManager->start() (Line: 57)
Symfony\Component\HttpFoundation\Session\Session->start() (Line: 54)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->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)
Fatal error: Uncaught Drupal\Component\Plugin\Exception\PluginNotFoundException: The "media" entity type does not exist. in /Applications/XAMPP/xamppfiles/htdocs/localhost/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:139 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/localhost/web/core/lib/Drupal/Core/Entity/EntityFieldManager.php(219): Drupal\Core\Entity\EntityTypeManager->getDefinition('media') #1 /Applications/XAMPP/xamppfiles/htdocs/localhost/web/core/lib/Drupal/Core/Entity/EntityFieldManager.php(196): Drupal\Core\Entity\EntityFieldManager->buildBaseFieldDefinitions('media') #2 /Applications/XAMPP/xamppfiles/htdocs/localhost/web/core/lib/Drupal/Core/Entity/EntityFieldManager.php(346): Drupal\Core\Entity\EntityFieldManager->getBaseFieldDefinitions('media') #3 /Applications/XAMPP/xamppfiles/htdocs/localhost/web/core/lib/Drupal/Core/Entity/EntityDisplayBase.php(405): Drupal\Core\Entity\EntityFieldManager->getFieldDefinitions('media', 'audio') #4 /Applications/XAMPP/xamppfiles/htdocs/localhost/web/core/lib/Drupal/Core/Entity/EntityDisplayBase.php(304): Drupal\Core\Entity\EntityDisplayBase->getFieldDefinitions() #5 /Applications/XAMPP/xamppfiles/htdocs/localhost/web/core/lib/Drupal/Core/Entity/EntityDisplayBase.php(541): Drupal\Core\Entity\EntityDisplayBase->toArray() #6 [internal function]: Drupal\Core\Entity\EntityDisplayBase->__sleep() #7 [internal function]: session_write_close() #8 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/localhost/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php on line 139