Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedIf we don't fix this it has to be documented - that themes must have a logo.
Comment #2
bleen CreditAttribution: bleen commentedif 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?
Comment #3
JacineI just don't get where the default Drupalicon logo went, but yeah theme_get_settings() is better.