So, I have a fresh instal of Drupal 7.34 and decide to create a simple theme.

I created a folder in /sites/all/themes/samayo and in it, I placed a screenshot.png, style.css, samayo.info inside samayo.info I pasted these settings.

name = samayo
description = samayo theme
version = 0.2.1
core = 7.x
engine = phptemplate

screenshot = screenshot.png

regions[left] = Left sidebar
regions[right] = Right sidebar
regions[content] = Content
regions[header] = Header
regions[footer] = Footer
regions[footer_content_1] = Footer Content 1
regions[footer_content_2] = Footer Content 2
regions[footer_content_3] = Footer Content 3

stylesheets[all][] = style.css

Went to drupa and chose this them as default, and I am getting this error for the past 2 hours.

Notice: Undefined index: highlighted in include() (line 126 of /var/www/public/dev.samayo/modules/system/page.tpl.php).
Notice: Undefined index: sidebar_first in include() (line 138 of /var/www/public/dev.samayo/modules/system/page.tpl.php).
Notice: Undefined index: sidebar_second in include() (line 144 of /var/www/public/dev.samayo/modules/system/page.tpl.php).
Warning: include_once(/var/www/public/dev.samayo): failed to open stream: No such file or directory in _drupal_theme_initialize() (line 209 of /var/www/public/dev.samayo/includes/theme.inc).
Warning: include_once(): Failed opening '/var/www/public/dev.samayo/' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in _drupal_theme_initialize() (line 209 of /var/www/public/dev.samayo/includes/theme.inc).

All the answer I checked do not seem to affect anything, including this which suggested placing

regions[highlighted] = Highlighted

in the samayo.info file, but even this could not change anything.


this is probably stemming from the default page.tpl.php which is expecting to find a region highlighted. The best approach IMHO would be to create a custom page tpl that excludes the regions you don't use, and includes the regions you do.

You can find the default page.tpl.php under modules/system - just copy the file to your theme directory (or sub folder templates) make the changes you want, and then clear the cache

  • I am not at that level yet. I can't modify this. I am using a book and video guide to learn about creating themes, so I am stuck at the first part. Which Means, I may get to the point of editing templates later, but now .. it seems complex to just jump and change anything. But, just out of curiosity .. what regions should I exclude from my example to make this thing work. – samayo Jun 10 '15 at 21:09
  • No need to hurt you brain with my noob question. I removed all regions and it all works. – samayo Jun 10 '15 at 21:15
  • the default page.tpl.php contains <?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?> - this is looking for the highlighted index, which doesn't exist if its not defined in the info file. did you clear the cache after adding regions[highlighted] to the info file? that should have picked it up and removed the error – Geoff Jun 10 '15 at 21:16
  • Nope, like I said .. I removed everything from the info, exception the required ones. – samayo Jun 10 '15 at 21:30

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.