Closed (fixed)
Project:
Drupal core
Version:
8.3.x-dev
Component:
language.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Feb 2017 at 18:05 UTC
Updated:
23 Mar 2017 at 09:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
blazey commentedAttaching browser test and the fix.
Comment #5
blazey commentedPathProcessorTest was not setting all required config items.
Comment #6
blazey commentedComment #7
leksat commented@blazey,
What this change does? Does it make PathProcessorTest fail? Should it go to the test-only patch then?
Comment #8
blazey commented@leksat, this line actually makes PathProcessorTest pass. It didn't set all the required config items.
Comment #9
leksat commentedAh, right. Thanks!
The code looks good and there is a test. RTBC!
Comment #11
blazey commentedRerolling.
Comment #12
alexpottAs far as I can see from D7's locale_language_from_url() this patch is correct. In Drupal 7 the path was only stripped if LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX and not LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN. So we must have broken this when we converted language negotiation to the new routing system. Going to ask a language subsystem maintainer for a +1.
Comment #13
alexpottI asked @GaborHojtsy in IRC and he agreed that this is a bug and that the fix looks correct. Nice find.
There's no need to do the explode or array_shift if the source is not LanguageNegotiationUrl::CONFIG_PATH_PREFIX. A small optimisation for sure but as we're adding the if here this seems in scope.
Comment #14
blazey commentedThanks for review. Attaching updated patch.
Comment #15
blazey commentedComment #16
leksat commentedThe last change is tiny. Back to RTBC.
Comment #17
alexpottCommitted and pushed b26016d to 8.4.x and 4bd7b24 to 8.3.x. Thanks!