I have Drupal 7 site using a custom theme, which was working just fine. I created some regions and then I went and extracted some parts of the html.tpl.php file and made them blocks to make them translatable. The idea was to display these new blocks in the new regions. But all of a sudden my theme stopped working and now drupal ignores my html.tpl.php file and uses the default. I have no idea what went wrong. Any help is much appreciated.

EDIT: I checked the logs and i noticed this error, just before the problem begun.

The directory /var/www/***********/tmp does not exist and could not be created.

I have a development server which runs the same site and this directory is specific to that. So i created a /tmp directory in the live site and set it in the configuration page but still the problem persists.

EDIT2: I am using a template.php file to send the blocks to the html.tpl.php. Something like this:

function <themename>_preprocess_html(&$variables) {
  $variables['footer_menu'] = block_get_blocks_by_region('footer_menu');
  $variables['info_bar'] = block_get_blocks_by_region('info_bar');
  • I assume you tried to clear cache? Apr 7, 2014 at 19:40
  • Yes, i did. It is still the same.
    – lunr
    Apr 7, 2014 at 19:45
  • 1
    Did you try changing the theme to say Bartik and then back to your custom theme? Apr 7, 2014 at 19:51
  • Check available variables in html.tpl.php api.drupal.org/api/drupal/modules%21system%21html.tpl.php/7
    – niksmac
    Apr 8, 2014 at 4:33
  • Yeah i did change the theme to a contributed one (Bartik is not there). The new theme works but when i change it back to my custom theme, everything is same again.
    – lunr
    Apr 8, 2014 at 6:05

1 Answer 1


The question is bit confusing and contradicting. The html.tpl file is just there to take care of the HTML structure. If you need to add regions or change blocks, then page.tpl.php is the one you need to change.


  • 1
    in html.tpl.php you cant print regions.
    – niksmac
    Apr 8, 2014 at 4:32
  • @NikhilM - Before you mark my answer down, you should have read it first. All i said was in html.tpl you cant print regions. You also said the same?
    – Stephen.R
    Apr 8, 2014 at 5:15
  • Thanks for the answer but in html.tpl.php you can print regions, although there is some extra work to be done. (passing the block to the file as a variable) Apparently this is not common, but before it was working just fine. Do you think this is related to the problem here?
    – lunr
    Apr 8, 2014 at 5:54
  • "file is just there to pass on the template variables" - simply false for html.tpl.php. It is there to create basic tags needed on all HTML outputs, not just to pass variables. Probably you confused files?
    – Mołot
    Apr 8, 2014 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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