I was running with Drupal 6.22 and tried doing an upgrade to drupal 7.10. The upgrade reported everything was successful.

My problem is that I was previously using a theme called 'contrast'. I thought that I had disabled it, but it now has references to that theme.

How can I get around these errors?

I tried moving garland into the all/themes folder and renaming it to contrast, but that only created another set of errors.

Notice: Undefined variable: site_name_and_slogan in include() (line 14 of   /mysite/sites/all/themes/contrast/page.tpl.php).
Notice: Undefined variable: site_name_and_slogan in include() (line 14 of /mysite/sites/all/themes/contrast/page.tpl.php).

2 Answers 2


Chose another default theme, disabled & deleted the 'contrast' directory. Clear your cache to make sure, but there should be nothing trying to reference a theme that isn't there.


Configuration -> Development -> Logging & ERrors

Set error messages to display: Errors & warnings

The, notices will not appear.

Notices are a good thing, the best option is to fix them in the theme, or have them fixed, but if that's not an option, my instructions above will hide them. As a developer, notices will catch little mistakes right away, which otherwise may have caused a lot more debugging time later.

Notices in PHP environments are often hidden, and it's not that big of a deal to hide them. Drupal 7 shipped with them forced on by default though because it looked bad when users would enable notice reporting on D6 and earlier because lots of modules weren't tuned up to handle notices.

Without seeing your theme, most likely the change is something like changing: if ($site_name_and_slogan) to if (isset($site_name_and_slogan)

Basically variables need to be defined before you can do anything with them.



// throws a notice if $foo was never defined above it
if ($foo) {

// will not throw a notice, even if we did not define it above
if (isset($foo)) {

// will throw a notice if we never defined what $output is
print $output;

// will not throw a notice
$output = 'hi';
print $output;

Your Answer

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