- 🇬🇧United Kingdom nicholasthompson
I have ended up debugging this in #3362515 and in my case, I have a non-multilingual site.
The content (for whatever reason) is in a mix of "en" and "und"... however due to the NULL check, this line will always try to resolve to what I assume is the current language for the content?
$langcode = $langcode ?: $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();
For some reason I've yet to work out, the node in question is set to "und" (as is the domain source and domain path)... however this causes NULL to change to "en". I'm guessing this is because Drupal defaults the site language to "en" rather than "und"?
This causes the domain_path lookup to fail and it falls back to something else making the page access denied.
This is the same behaviour in 8.x-1.2
The patch from @JeremyFrench does not help in my case... in fact, for me, the best fix is to simply remove the line altogether... I assume this is a poor choice for other sites? Although does this mean other sites should fall back to using the alias for the language of the content, rather than the language of the site itself?
- Status changed to Needs work
over 1 year ago 8:00am 25 May 2023 - 🇬🇧United Kingdom nicholasthompson
For reference, this is my change - however I'm almost certain this is not the right fix for everyone.
- 🇬🇧United Kingdom cameronwelch
the above caused an issue for me where aliases set to english would no longer be recognised - here's the patch I'm using instead