Plain unstyled HTML output (Theme unavailable)

If your site appears as plain HTML with missing styles and/or images:

Try a view-source and see what the path to the theme CSS in the header is. Does it look correct?
Sometimes this can get out of sync when migrating between sites that are almost-but-not-quite identical.
Some things to check:

  1. It could be you are trying to use a theme that is not active. This can happen when you have set the default theme in settings.php but that theme has not yet been added or configured. It can also occur when did not switch back to the default theme before upgrade. To fix that issue, go to admin > build > themes and select the default theme (Garland in 5.x and Bluemarine in 4.7 and 4.6).
  2. Your $base_url setting (in your settings.php file) may be misconfigured. The $base_url setting is what gets prepended to all paths for extra resources like stylesheets, images, javascript includes and form handlers. If the browser can't find those resources on that path, then they will be missing from the rendered HTML you see in your browser.
    example:
    When developing and testing on a local Drupal version you might use localhost in your $base_url. This works fine when using the browser on the development computer, but when you access Drupal from another computer all these extra resources are missing. What is happening is that browser on the other computer is trying to access these extra resources from localhost and failing to find them there. The solution is to change $base_url to use a hostname that points to Drupal from both computers (ie not localhost).
  3. This can also happen if the expected theme is deleted, renamed or moved by accident. Occasionally if you are using multisites and have placed the theme into the default or sitename folder instead of all/themes the theme will be invisible after a migration.
    In this case you can usually visit your themes configuration page to fix it. If the navigation block is unavailable, enter the URL ?q=admin/build/themes directly. (You may have to log in the hard way first).
    Often, just viewing and saving that themes admin page is enough to self-repair, as the system can now locate the real theme path by name. If not, you can at least choose a default theme to use and troubleshoot from there - find where your theme has gone.
  4. Check your theme folder is readable! Sometimes a bad copy or restore from backup can put the files there, but not readable to the web process.
  5. When using css aggregation, your system needs to be able to write to the sites/{sitename}/files/ folder (as always). Ensure that your files folder is still correctly writable. Try turning off css aggregation to test.
 
 

Drupal is a registered trademark of Dries Buytaert.