HaLe Blog twitter
HaLe Blog Rss

Bug in Artisteer 2.0 for multilanguage Drupal 6 themes

Posted by lhe | Posted in Drupal, Leiv Hendrickx | Posted on 13-03-2009

4

We have been playing around with Artisteer 2.0 for a day now and we already discovered a bug in it. The links in the language switcher block were not working when we activated the theme generated by Artiseer. After looking into the generated theme code, we discovered where it went wrong.

Basically it has to do with the difference in the l() function between D5 and D6.

Anyway, this is the fix

 

file : template.php

function: get_html_link_output($link) 

line : 163 

original code:

163
164
165
if (isset($link['href'])) {
    $output = l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment'], FALSE, $html);
  }

correct code:

163
164
165
166
167
168
169
170
if (isset($link['href'])) {
	if (get_drupal_version() == 5) {
	  $output = l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment'], FALSE, $html);
	}
	else {
	  $output = l($link['title'], $link['href'], array('language' => $link['language'], 'attributes'=>$link['attributes'], 'query'=>$link['query'], 'fragment'=>$link['fragment'], 'absolute'=>FALSE, 'html'=>$html));
	}
  }

Comments (4)

Sry my english, I’m from Argentina.

Thanks for that, days ago I’m fighting with Drupal, and not find a way to solve this problem

Thanks really

We’re glad to help!

Thanks, this saved my life. I have been trying to solve this for a few hours. Thx again ;)

Really Thanks!
I was starting to hate Artisteer and Drupal, but the solution was right there! Thanks a lot!

Write a comment