Try our conversational search powered by Generative AI!

Example on world documentation for partialrouting doesn't seem to work when deployed to servers

Created

May 10, 2021

Updated

Jan 25, 2022

Area

CMS Core

State

Closed, Won't Fix


Description

When you use GetChildren without specifying a language (a LanguageLoaderOption) then the language is resolved from the context. In case of a normal web request, that language is determined from the URL (either through host mapping or language segment). However an initializable module is likely to run outside a normal webrequest, so in that case language is resolved using other available sources, like globalization element in web.config. To ensure a deterministic behavior, you should explicitly specify a language when loading content from an initializable module. (You can use a fallback to master or use LanguageLoaderOption.MasterLanguage() or LanguageSelector.MasterLanguage if you do not know the language beforehand.)