2

I have a site configured with an item and field language fallback. We are using glassmapper as an ORM. We have used VersionCountDisabler in the code and global.asax level.

Settings:

  • enableItemLanguageFallback="true"
  • enableFieldLanguageFallback="true"
  • enforceVersionPresence="true"

In the Content editor, it shows fallback version with all the values from the fallback item.

However, it is returning an empty value for the non-shared fields. Any help will be much appreciated.

2

Finally I fixed it by following the below steps:

  1. Enable language settings at site level in config file under configuration as below:

    <site
    name="custom-portal"
    hostName="portal"
    virtualFolder="/"
    physicalFolder="/"
    rootPath="/sitecore/content/portal"
    startItem="/home"
    database="web"
    domain="extranet"
    allowDebug="true"
    cacheHtml="true"
    htmlCacheSize="10MB"
    registryCacheSize="0"
    viewStateCacheSize="0"
    xslCacheSize="5MB"
    filteredItemsCacheSize="2MB"
    enablePreview="true"
    enableWebEdit="true"
    enableDebugger="true"
    disableClientData="false"
    notFoundItem="/Error-404"
    patch:before="site[@name='website']"
    dictionaryDomain="PortalDictionary"
    
    enableItemLanguageFallback="true"
    enableFieldLanguageFallback="true"
    enforceVersionPresence="true"
    />
    
  2. Enable language fall-back setting at language level under Sitecore->System->Languages in Sitecore enter image description here

  3. Enable language fall-back setting at template level. Then only glassmapper will read the non-shared fields.

enter image description here

  1. Add VersionCountDisabler in global.ascx.cs, which is required by the glassmapper and this is the most important step.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.