Added logo through the theme ui yet it never seems to display.

Comments

benjifisher’s picture

Component: User interface » Code
Status: Active » Needs review

I had the same problem, and I think I found the answer. In themes/nokia_mobile/page.tpl.php, replace the line (line 52)
if ($logo && !is_null($logo) && is_file($logo)) {
with
if ($logo && !is_null($logo) && is_file($_SERVER['DOCUMENT_ROOT'] . $logo)) {
It looks like a bug to me. I hope this gets changed in the distribution.

I am new at this. I hope it is appropriate for me to change the status to "needs review."

atrasatti’s picture

Assigned: Unassigned » atrasatti

I remember having a lot of trouble with paths of the logo. I will look into this.

atrasatti’s picture

benjifisher’s picture

Sorry, it took me a while to get around to reading the instructions for getting a project by CVS. I checked out the whole theme using these instructions: http://drupal.org/node/321 . Is there an easier way to get just the referenced patch?

The CVS version of the theme solves the problem for me: I see the logo now.

I still feel that the simpler version I proposed in comment #1 should work. The $logo variable gives a URL path, and the PHP is_file() function needs a file-system path. See http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_get_... .

Do you have a setup where is_file($logo) returns TRUE?

cerion86’s picture

I have same problem, what can I do to solve it please?
I can't understand you solutions, I changed line 52 in page.tpl.php but nothing changed..

....thanks!

HS’s picture

Priority: Normal » Major
Status: Needs review » Active
HS’s picture

Logo still does not display. Any fix to this?

benjifisher’s picture

Hm, the link in #3 does not seem to work now.

@HS, what did you try? Which version are you using? Did you try my suggestion from #1? Try some debugging. Look at the markup (using Firebug or something). What do you get? Try something like

<!-- What is the $logo variable? Answer: <?php print $logo; ?> -->

right before the lines


            if ($logo && !is_null($logo) && is_file($logo)) { 
...