I have installed ninesixty in the main themes directory and have created a subtheme in sites/all/themes.

I haven't started working with it yet but the error below is being reported. I'm a bit of a newbie so don't know whar it means.

Notice: Undefined index: search_box in include() (line 26 of C:\Users\Paul\Sites\acquia-drupal\themes\ninesixty\page.tpl.php).

Comments

andersiversen’s picture

I have the same error, and haven't found a solution yet.

danharper’s picture

Similar issues when trying to create a subtheme,

Notice: Undefined variable: linked_logo_img in include()
Notice: Undefined variable: linked_site_name in include()
Notice: Undefined variable: main_menu_links in include()
Notice: Undefined variable: secondary_menu_links in include()

Although it's possible I've done it wrong, am I right in thinking you just take a copy of the ninesixty directory then modify the .info to change the themes name and then upload to sites/all/themes/your-theme ?

Cheers Dan

fatcrobat’s picture

check if the index for all this exists in page.tpl.php

if (isset($page['search_box'])):

rather than

if ($page['search_box']):

more info can be found here...should be fixed by the author

https://drupal.org/node/34341

danharper’s picture

Hi,

All the variables are declared in the template.php under a pre-process function in the correct way as shown in the post link above, so I assume the page.tpl.php isn't calling the variables correctly from template.php but I'm not sure how to troubleshoot this.

I'm not 100% I have set the sub theme up correctly could you give me the correct process for setting one up as I can't seem to find a step by step to do this on Drupal 7.

Cheers Dan

fatcrobat’s picture

my post was targeted to the first post

your error is telling you, that the variables are not defined.

your sub-theme creation and knowledge is a little bit wrong.

create a folder in sites/all/themes/YOURTHEMENAME

and create a .info file containing the following

name = <yourthemename naming>
base theme = ninesixty
description = <yourthemename description>
core = 7.x
screenshot = screenshot.png

; Regions
regions[page_top]       = Page top
regions[header]         = Header
regions[search_box]     = Search Box
regions[highlighted]    = Highlight
regions[help]           = Help
regions[content]        = Content
regions[sidebar_first]  = Left sidebar
regions[sidebar_second] = Right sidebar
regions[footer]         = Footer
regions[page_bottom]    = Page bottom

you don't need a template.php by default. if you need one, just create an empty one.

mrpauldriver’s picture

Many thanks for the reply

fenda’s picture

#5 fixed this for me.

Regions are not inherited from a parent base theme.
See http://drupal.org/node/225125

fenda’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.