This code in theme_get_setting() assumes the "default" logo.png file exists in the theme and causes a 404 when it does not:

// Generate the path to the logo image.
if ($cache[$theme]['toggle_logo']) {
  if ($cache[$theme]['default_logo']) {
    $cache[$theme]['logo'] = file_create_url(dirname($theme_object->filename) . '/logo.png');
  }
  elseif ($cache[$theme]['logo_path']) {
    $cache[$theme]['logo'] = file_create_url($cache[$theme]['logo_path']);
  }
}

Shouldn't the default logo be misc/druplicon.png? If not, shouldn't we check if the file exists in template_preprocess_page() before populating the $logo variable?

Comments

Jeff Burnz’s picture

If we don't fix this it has to be documented - that themes must have a logo.

bleen’s picture

if we're going to check that the file exists (which I think we should) shouldn't we check it right there in them_get_settings so that the result is cached .. not in template_preprocess_page?

Thoughts?

Jacine’s picture

I just don't get where the default Drupalicon logo went, but yeah theme_get_settings() is better.