add default culture when there's only 1 language configured

(cherry picked from commit f7b42a50cc)
This commit is contained in:
Vlael Layug
2022-10-21 17:35:51 +08:00
committed by Sebastiaan Janssen
parent 0b36c1195e
commit a810c59774

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))
{