What does this error message mean? How can I fix it?

User warning: The following theme is missing from the file system: media in drupal_get_filename() (line 268 of core/includes/bootstrap.inc).
drupal_get_filename('theme', 'media') (Line: 291)
drupal_get_path('theme', 'media') (Line: 394)
Drupal\Core\Asset\LibraryDiscoveryParser->drupalGetPath('theme', 'media') (Line: 85)
Drupal\Core\Asset\LibraryDiscoveryParser->buildByExtension('media') (Line: 87)
Drupal\Core\Asset\LibraryDiscoveryCollector->getLibraryDefinitions('media') (Line: 66)
Drupal\Core\Asset\LibraryDiscoveryCollector->resolveCacheMiss('media') (Line: 149)
Drupal\Core\Cache\CacheCollector->get('media') (Line: 44)
Drupal\Core\Asset\LibraryDiscovery->getLibrariesByExtension('media') (Line: 58)
Drupal\Core\Asset\LibraryDiscovery->getLibraryByName('media', 'form') (Line: 54)
Drupal\Core\Asset\LibraryDependencyResolver->doGetDependencies(Array, Array) (Line: 56)
Drupal\Core\Asset\LibraryDependencyResolver->doGetDependencies(Array) (Line: 31) Drupal\Core\Asset\LibraryDependencyResolver->getLibrariesWithDependencies(Array) (Line: 104)
Drupal\Core\Asset\AssetResolver->getLibrariesToLoad(Object) (Line: 116)
Drupal\Core\Asset\AssetResolver->getCssAssets(Object, ) (Line: 291)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries(Object, Array) (Line: 161)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments(Object) (Line: 45)
Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond(Object, 'kernel.response', Object) call_user_func(Array, Object, 'kernel.response', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.response', Object) (Line: 191)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 173)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 664)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)


Had same issue. Resolved with:

  • search THEME-NAME string in themes folder
  • remove reference to the useless theme

In my case, I was having

User warning: The following theme is missing from the file system: pxrflx in drupal_get_filename() 

This warning disappeard once I removed

  - pxrflx/global-styling

from the a_differnt_theme_from_pxrflx.yml file


This warning generally occurs if Drupal can't find the folder of the related module or theme. There is a manual page on how to get rid of this error: How to fix "The following module is missing from the file system..." warning messages.

Looking at the date of the question, there is a big chance this is happening because of version conflict between the Media entity module and source provider modules. If the installed version of the Media entity module is 1.x, then your core media module is not installed. If you are using the 2.x version of the media source provider modules like the Media entity video module or the Video Embed Field module, they are probably looking for the core Media module.

If you're building a new site, you should start over with the core Media module. If you're upgrading your existing site, you should follow the upgrade path. Instructions for both are given on the Media entity project page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.