add default culture when there's only 1 language configured

This commit is contained in:
Vlael Layug
2022-10-21 17:35:51 +08:00
committed by Michael Latouche
parent 5ef43cb4f0
commit f7b42a50cc

View File

@@ -109,6 +109,11 @@ public class ContentTreeController : ContentTreeControllerBase, ISearchableTreeW
{
var culture = queryStrings?["culture"].ToString();
if(culture.IsNullOrWhiteSpace())
{
culture = _localizationService.GetDefaultLanguageIsoCode();
}
IEnumerable<MenuItem> allowedUserOptions = GetAllowedUserMenuItemsForNode(entity);
if (CanUserAccessNode(entity, allowedUserOptions, culture))
{