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

· · · ·

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

Login to post comments

To submit a patch, create a

Garrett Albright - Wed, 2009-01-14 21:48

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. :)