No items found in the Select Media dialog box for some languages

  • If the default language was changed in the web.config file, when you search in the Select Media dialog box, you might get the following message:
    No items are found.
    The log might contain the following  error:
    Exception: System.InvalidOperationException 
    Message: Item must have more than 1 version in the default language (nl-NL) 
    Source: Sitecore.ContentSearch 
    at Sitecore.ContentSearch.Utilities.LanguageFallbackDataService.EnsureFallbackVersion(Item rootItem) 
    at Sitecore.ContentSearch.Utilities.LanguageFallbackDataService.GetDescendantsByTemplateWithFallback(Item rootItem, TemplateID templateId) 
    at Sitecore.ContentSearch.Utilities.LanguageFallbackDataService.GetDescendantsByTemplateWithFallback(Item rootItem, String templateId) 
    at Sitecore.ContentSearch.Utilities.LinqHelper.CreateQuery[T](IProviderSearchContext context, IEnumerable`1 searchStringModel, Item startLocationItem, IEnumerable`1 additionalContexts) 
    at Sitecore.ContentSearch.Utilities.LinqHelper.CreateQuery[T](IProviderSearchContext context, IEnumerable`1 searchStringModel) 
    at Sitecore.ItemWebApi.Pipelines.Search.ParseSearchText.Parse(IProviderSearchContext providerSearchContext, String searchText) 
    at Sitecore.ItemWebApi.Pipelines.Search.ParseSearchText.Process(SearchArgs args) 
    at (Object , Object[] ) 
    at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) 
    at Sitecore.ItemWebApi.Pipelines.Request.Search.RunSearchPipeline(RequestArgs args, String searchText, String languageName, Boolean showHiddenItems) 
    at Sitecore.ItemWebApi.Pipelines.Request.Search.Process(RequestArgs args) 
    at (Object , Object[] ) 
    at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) 
    at Sitecore.ItemWebApi.Pipelines.HttpRequest.LaunchRequest.Process(HttpRequestArgs arguments)
  • To resolve this issue, add a version in the default language, for example, nl-NL, to the /sitecore/system/Settings/Buckets/Search Types
    item in the Master database.

Applies to:

CMS 7.0+

July 22, 2019
July 22, 2019

Reference number:

95444