Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
language system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
2 Jan 2008 at 14:01 UTC
Updated:
20 Jan 2008 at 16:52 UTC
Jump to comment: Most recent file
Comments
Comment #1
gábor hojtsyWell, this looks like a more widespread bug here. All of language_initialize() uses the complete language list, not only the enabled languages. We should have a common
$languages = language_list('enabled'); $languages = $languages[1];at the top and use that IMHO.Comment #2
theborg commentedAfter some tests I agree with Gábor comments that all of language_initialize() should use only the enabled languages.
Patch reformed with
$languages = language_list('enabled'); $languages = $languages[1];.Also note that after removing
language_list('prefix');from 'path prefix mode' the paths with the default language (en) on the url are also valid:Comment #3
theborg commentedComment #4
gábor hojtsyThis looks buggy, because the array used in the LANGUAGE_NEGOTIATION_PATH* cases is indexed with the path prefix and not the language code. If I apply your patch, the custom path prefix feature goes away, and it is only possible to use the language code as path prefix.
Comment #5
gábor hojtsyI mean it is indexed by path prefix before the patch but indexed by language code after the patch.
Comment #6
theborg commentedAy!, didn't notice the custom path prefix feature, sorry.
With reordered $language array by prefix.
Comment #7
gábor hojtsyWell, I'd rather do foreach on the language list as in LANGUAGE_NEGOTIATION_DOMAIN and return when found instead of building up a temporary array. Also renaming the $language temp variable in LANGUAGE_NEGOTIATION_PATH* to $prefix makes a lot of sense. Don't know why we did not do that initially.
Comment #8
theborg commentedAdded foreach block.
Using $prefix as variable.
Thanks Gábor.
Comment #9
gábor hojtsyLooks much better. I committed this with one extra line of comment added in the $mode == LANGUAGE_NEGOTIATION_PATH_DEFAULT case. Thanks!
Comment #10
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.