Bug in Artisteer 2.0 for multilanguage Drupal 6 themes
March 13th, 2009
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)); } } |