Plain unstyled HTML output (Theme unavailable)
Site administrators · Drupal 4.5.x or older · Drupal 4.6.x · Drupal 4.7.x · Drupal 5.x · Drupal 6.x · No known problems
Last modified: November 26, 2009 - 09:46
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:
- 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).
-
Your
$base_urlsetting (in yoursettings.phpfile) may be misconfigured. The$base_urlsetting 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
localhostin 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 fromlocalhostand failing to find them there. The solution is to change$base_urlto use a hostname that points to Drupal from both computers (ie notlocalhost).
- 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
defaultorsitenamefolder instead ofall/themesthe 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/themesdirectly. (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. - 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.
- 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.
