I change the logo on the default theme &the site breaks with 500 error, i take the logo off & it works again.
I am also getting these errors when making changes.

Notice: Undefined index: favicon_path in system_theme_settings_validate() (line 630 of /var/aegir/platforms/dev1/openpublic-1.0-beta1/modules/system/system.admin.inc).
Notice: Undefined index: favicon_upload in system_theme_settings_submit() (line 679 of /var/aegir/platforms/dev1/openpublic-1.0-beta1/modules/system/system.admin.inc).

CommentFileSizeAuthor
#4 108733.patch1.28 KBe2thex

Comments

resveld’s picture

That's because in the original theme the following is hardcoded in template.php:

if (preg_match("|^.*/files/(.*)|", $logo, $m)) {
    $file = "public://" . $m[1];
    $header_logo = l(theme('image_style', array('style_name'=>'logo', 'path'=>$file, 'alt'=>"$site_name logo")), $frontpage, array("html"=>TRUE, 'attributes'=>array('class'=>'logo')));
    $footer_logo = l(theme('image_style', array('style_name'=>'logo-small', 'path'=>$file, 'alt'=>"$site_name logo")), $frontpage, array("html"=>TRUE, 'attributes'=>array('class'=>'logo')));
  }
  elseif ($logo == url(drupal_get_path('theme', 'sem_theme') . "/logo.png", array('absolute'=>TRUE))) {
    $header_logo = l(theme('image', array('path'=>$logo, 'alt'=>"$site_name logo")), '', array("html"=>TRUE, 'attributes'=>array('class'=>'logo')));
    $footer_logo = l(theme('image', array('path'=>drupal_get_path('theme', 'sem_theme') . "/logo-sm.png", 'alt'=>"$site_name logo")), '', array("html"=>TRUE, 'attributes'=>array('class'=>'logo')));
  }
  else {
    $header_logo = l(theme('image', array('path'=>$logo, 'alt'=>"$site_name logo")), '', array("html"=>TRUE, 'attributes'=>array('class'=>'logo')));
    $footer_logo = l(theme('image', array('path'=>$logo, 'alt'=>"$site_name logo")), '', array("html"=>TRUE, 'attributes'=>array('class'=>'logo')));

Change your file to logo.png and it should be ok

-Ronald

lloydpearsoniv’s picture

you dont see that as a problem? Why would you guys hardcode the logo into the template?

resveld’s picture

I'm not saying it's not a problem!
Also, i'm not a developer for OpenPublic, nearly a fanatic :)

e2thex’s picture

Status: Active » Fixed
StatusFileSize
new1.28 KB

So the logo is not hard code, what we were trying to do is use image styles on the logo (so that a smaller version would appear in the footer) but image styles only work if the file is in the files dir. So if we did not have an upload image we were just using two different images in the theme. The problem you ran into is there was bug in the code when an image was uploaded.

This will be in the next version and I have attach a patch of the change.

Thanks for the catch!

Status: Fixed » Closed (fixed)

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