I'm using the language switcher block and noticed that when I used the Marina theme it no longer works properly. Specifically I have two languages and the language picker's first language is no longer and active link, while the second language in the list is working properly as an active link.

So users can switch to the second/last language in the list but cannot switch back by clicking on the first language in the language switcher block because it is not an active link.

Here's the HTML block that's being generated. Not sure if it's important but you can see that the first list item is not labeled as 'active' but the second list item is:

<ul>
<li class="en first">
<a class="language-link" href="/drupal/">
<img class="language-icon" width="16" height="12" alt="English" src="/drupal/sites/all/modules/languageicons/flags/en.png"/>
</a>
</li>
<li class="ja last active">
<a class="language-link active" href="/drupal/ja">
<img class="language-icon" width="16" height="12" alt="日本語" src="/drupal/sites/all/modules/languageicons/flags/ja.png"/>
</a>
</li>
</ul>
CommentFileSizeAuthor
#3 Screen.png4.35 KBAnonymous (not verified)

Comments

Anonymous’s picture

I found the 'cause', this line in block.tpl.php

block.tpl.php:19: <div class="block-icon pngfix"></div>

If I remove that line the problem goes away. I'm not sure if I am introducing any new problems though :( I unfortunately don't have IE6 to test with

jwolf’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Please provide a link to "the language switcher block" module so that we can look into this issue.
Identifying the languages you are using would help too.

Also, screenshots and/or links to the site of where this can be reproduced would help.

The more details you provide the more likely we can troubleshoot this issue.

Anonymous’s picture

StatusFileSize
new4.35 KB

Hi and thanks for following up.

The language switcher block is part of Core (I think it's provided by Locale). I'm using English and Japanese but I don't think the actual languages used matter since the problem is with the HTML of the links. And also as pointed out the page renders fine in Opera but not Firefox.

You can see the problem (if you use Firefox) at the site below (might not be there for long though)

http://www.cachekuni.com/drupal

Notice that if you put the cursor *anywhere* on the Japanese flag it acts as a link. However if you try this with the English flag, you only get a link at the very bottom/under the flag. Putting the cursor in the middle of the flag doesn't work as a link.

Would post a screen shot but I can't get the pointer to show up when I take a screen shot in Opera. I'm including a screen shot of Firefox showing the 'hand' pointer is not showing on the UK flag but is when on the Japanese flag.

jwolf’s picture

Version: » 6.x-3.0-alpha1

Updating version info:
Fusion version has been moved to 3.x

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Active
jeremycaldwell’s picture

Hi totsubo, can you try adding this bit of CSS to your theme?

.block-locale .block-icon {
  width: auto;
}

For some reason that seems to fix the local language block switcher for me in FireBug.

dddave’s picture

Hi folks,

I can confirm the misbehaviour described by totsubo and more importantly confimr that the code from #6 makes the language switcher work fine again.

jeremycaldwell’s picture

Assigned: Unassigned » jeremycaldwell

Changes have been made to the theme and will be in the next release. Thanks for testing this out too.

jeremycaldwell’s picture

Status: Active » Fixed

Fixed in the Alpha 2 release.

druplicate’s picture

This causes the icon to disappear in the language switcher block using Firefox 3.5.7, and the AM alpha -2 release.

In Firebug I disabled that line and the icon reappeared.

dddave’s picture

I can confirm that I cannot get a Block Title Icon but the language switcher and the language icons are working fine.

@10: Do the language icons still work after deleting the line?

druplicate’s picture

Yes, I disabled the line in Firebug and the icon reappeared.

dddave’s picture

Title: Language switcher broken under Marina 2.0 with Firefox » Language switcher broken under Marina 3.0 with Firefox -> Fix breaks block title icons and can be rolled back
Version: 6.x-3.0-alpha1 » 6.x-3.0-alpha2
Category: support » bug
Status: Fixed » Active

Ok, that is really weired.

I removed the line that should make the language switcher block work fine (#6) and now I get the block title icon AND the switcher icons+links work fine as well. It seems that the "fix" is no longer needed. I cannot make out if this is due to the fact that I now am using language icons 2.0 or some other changes in AM3, Fusion or skinr.

So it seems that this fix can be rolled back...

jeremycaldwell’s picture

Thanks for all the testing and feedback dddave and druplicate. I removed the ".block-locale .block-icon" code as it's not needed anymore and seems to be working correctly now. Will get this change into the next release of the theme.

droshani’s picture

Please consider to look at this issue as well,

http://drupal.org/node/688280

Thanks

jensensi’s picture

It sounds like we are having a similar problem, but can’t get it to work.

We are using Burnt Rubber theme with 2 languages – Danish (default) and English. In IE8 it works perfectly switching between languages and pages, but in FF it will only show English pages, except when you type the specific node ID in the URL (e.g. node/5). It shows the correct links when you use all roll over the languages and menu items, but keeps showing the English version of the pages.

When you specifically switch to a Danish page and roll over the Danish menu items, it shows the links with their node ID, not the defined path settings.

I have tried the code in #6, but it doesn’t do anything. Help!

jeremycaldwell’s picture

Status: Active » Fixed

Fixed in the beta release of the theme.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.