Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
locale.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2008 at 05:44 UTC
Updated:
3 Nov 2008 at 09:32 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Freso commentedLanguage Icons only add icons to the links, it doesn't generate the links themselves.
Comment #2
wuf31 commentedThanks, Fresco for pointing out that it's the locale module problem..
Though I still think this is a bug..
Attached is a one line patch for locale module to fix this problem..
Please review :)
Comment #3
Freso commentedRight, of course. Anyway, if you want to have it fixed, it should go to 7.x (and then backported to 6.x) - of course, only if the bug still exists in the 7.x code base.
First off: A quick work around for your sites could be to use the Global Redirect module until the issue is fixed.
Second: Perhaps something smarter than
$_GET['q'] == variable_get('site_frontpage', 'node') ? '' : $_GET['q']could be used to determine if we're already in the frontpage? Obviously, when you're on "site/" or "site/en",$_GET['q']will be''- that is, not'node'or any other string set as thesite_frontpagevariable. Or perhaps we could just remove the logic all together, as is done in the patch? This is what is done anyway, if not on the front page, so...Comment #4
wuf31 commentedwell, let's just keep it simple..
As actually I don't quite follow you :P
Btw, is there any obvious bugs by doing it this way?
Comment #5
kscheirerhow about
drupal_is_front_page()instead? Btw, it looks like this has already been changed in HEAD, so there must be another issue dealing with this, but I couldn't locate one.Currently the code reads
Comment #6
Freso commentedThe code seems to be from #141996: Language switcher block, which used
'href' => $_GET['q']... and it doesn't seem to have changed in neither 6.x or 7.x.(And now in the proper issue to boot.)
Comment #7
selebritis commentedhave the same problem, thank you I'll try it first ...
Comment #8
damien tournoud commentedThe proper way is indeed to call drupal_is_front_page(), and to use '' when it is. url() will take care of the rest.
Comment #9
wuf31 commentedThanks Damien,
Patch tested on 6.4.
Seems good.
Comment #10
Anonymous (not verified) commentedThe patch looks good to me and the OP is satisfied. Marking RTBC.
Comment #11
wuf31 commentedModified patch to let i18n play nicely with the locale block.
Any review??
Comment #13
wuf31 commentedCool.. QA Patch tester :P
Let's try this..
Comment #14
wuf31 commentedComment #16
wuf31 commentedAnother try..
It it still doesn't work.. I'll let others give it a shot.
Comment #18
meba commentedsubscribe. i didn't test this yet, but upon looking into code, i don't like that we are adding yet another SQL query for determining the path. Is there another solution?
Comment #19
drewish commentedplease try this patch out.
Comment #20
damien tournoud commented@drewish:
Please remove the spaces after the $path.
@meba:
We are not adding an SQL query.
drupal_is_front_page()is cached, and it is called anyway (for example inmenu_get_active_breadcrumb().Comment #21
drewish commentedDamien Tournoud, at this point for a one character change you could re-roll the patch as easily as i could... or heck you could just edit the patch.
Comment #22
damien tournoud commented@drewish: why are you not allowing me to be lazy?
Here is a proper patch, I confirmed again it works as intended. Because the patch is trivial and several people already looked at it, I'm marking this as ready to go in.
Comment #23
webchickThanks guys, comitted. Marking down to 6.x for consideration.
Comment #24
gábor hojtsyThanks, committed to Drupal 6.x.
Comment #25
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.