Submitted by Mike on Thu, 11/19/2009 - 11:47am
The Drupal Sub-Theme system is a welcome addition to the Drupal system. There are a few gotchas that can trip up the unwary. Here's a quick troubleshooting list to check when you are creating a sub-theme based on an existing Drupal theme.
- Disable Drupal's CSS and JavaScript caching in your site's admin settings/performance page: example.com/admin/settings/performance
- Be sure to define at least one style sheet in your .info file. Base theme style sheets are not inherited unless you define at least one style sheet for your sub-theme
- Avoid Frustration: Some changes won't take effect right away. Rebuild the Drupal theme cache by visiting your site's admin/build/themes page (hit the browser reload button just to be certain!)
- White Screen Of Death?: If you override one of the base theme's template files, then later delete it, you may fall victim to the dreaded WSOD, and will be unable to access the site. Solution: the theme cache may need to be cleared.
- If you can't access your site due to a WSOD, use a SQL query to delete the theme cache entry from the {cache} table:
delete from cache where cid like 'theme_registry%';
then reload your site's page. For more information, see Clearing the Theme Cache.
- If you can't access your site due to a WSOD, use a SQL query to delete the theme cache entry from the {cache} table: