Bug in Zen Classic theme: Logo link is using base_path instead of front_page

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
demisone's picture

Hi there all and thanks everyone for their work in the zen theme! I'm pretty new to drupal and I was using it as a basis in a multi-lingual site but I was in front of a bug: when the presentation language was different than the default language the logo link (which is supposed to take you back to the home page) was pointing always on the default language. I started searching on google, thinking that it was a drupal problem, but since I couldn't find nothing I started to search through the source code of zen theme. Luckily enough after 3-4 mins I found that this was causing the problem: (this is the output if a diff command - particularly git's)

diff --git a/sites/all/themes/zen/zen_classic/page.tpl.php b/sites/all/themes/zen/zen_classic/page.tpl.php
@@ -95,7 +95,7 @@

         <?php print $search_box; ?>
         <?php if (!empty($logo)): ?>
-          <a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home">
+          <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home">
             <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" id="logo" />
           </a>
         <?php endif; ?>
@@ -104,7 +104,7 @@

         <?php if (!empty($site_name)): ?>
           <div id="site-name"><strong>
-            <a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home">
+            <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home">
               <?php print $site_name; ?>
             </a>
           </strong></div>

I didn't have the time to read through the instructions on how to send a CVS patch so I thought to post it here and let someone grab it and "push it" to the code base :)

Hope this helps,
Nikos

Comments

To submit a patch, create a

Garrett Albright's picture

To submit a patch, create a patch using these directions. Then find the issue queue for the project (Zen's is here) and search through it to see if there's already an issue for your problem. It turns out in this case there is one. I left a comment on it with a patch; hopefully it'll get accepted for the next release of Zen.

So thanks for bringing this to our attention, but please use the issue queue next time. :)

pandisvezia's picture

Hi,

I saw this conversation while I was searching for a way to replace the logo link. It seems that I must modify the path but I don't know how. Could you help me?

Thank you.

You've stumbled upon a 4 year

JohnAlbin's picture

You've stumbled upon a 4 year old conversation about a bug that was fixed long ago.

But to replace the logo link you need to edit the link in your theme's page.tpl.php page. :-)

  - John (JohnAlbin)

I love Drupal wandering!

pandisvezia's picture

that it makes me discover old problems and solve new ones, thank you for the reply! :)