Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Since the URL language provider is always invoked on multilingual sites, as it is tied to the non-configurable URL language type, path prefixes are always active, even when the URL language provider is disabled for the interface language.
This is a wrong behavior as path prefixes should be active only if the URL language provider is enabled for a configurable language type.
To reproduce this just add the French language and visit http://example.org/fr
: the french front page is shown instead of a 404 error.
Comment | File | Size | Author |
---|---|---|---|
#9 | language-780318-9.patch | 5.44 KB | plach |
#3 | language-780318-3.patch | 8.62 KB | plach |
#1 | language-780318-1.patch | 4.34 KB | plach |
Comments
Comment #1
plachThe attached patch makes the URL language provider look for path prefixes only if it's enabled for at least one configurable language type.
Probably tests need to be fixed, but let's see if the bot is happy with this one first.
Comment #3
plachTests should be fixed now.
Note: this is true only after submitting the language detection and selection form at least once.
Comment #4
plachMoving to critical as this prevents an upgrade path test to complete successfully and it is somehow an upgrade path issue itself.
Comment #5
plach#3: language-780318-3.patch queued for re-testing.
Comment #6
juan_g CreditAttribution: juan_g commentedplach wrote:
I think that's #812416: Locale upgrade path broken.
Comment #7
plachExactly :)
Comment #9
plachRerolled
Comment #10
Damien Tournoud CreditAttribution: Damien Tournoud commentedYay. This adds a tad of complexity to the bootstrap process (a few loops and variable_get calls), but it only affects multilingual sites.
Comment #11
webchickCommitted to HEAD. Thanks!
Comment #13
fortis CreditAttribution: fortis as a volunteer commentedthere is installation notices in locale.module
constants have been moved into locale.inc, so we should require it in locale_language_negotiation_info()
attached small fix
Comment #14
fortis CreditAttribution: fortis as a volunteer commentedseems it should be in separate issue, moved there https://www.drupal.org/node/2571711