May 10, 2021
Jan 25, 2022
CMS Core
Closed, Won't Fix
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.)