Never create all lowercase languages in Sitecore

We recently had a scary issue with disappearing content in Sitecore 8.2. And while we haven’t ascertained exactly what caused our errors I’d like to share it with you none the less.

For a Sitecore 8.2 solution we created lots of new custom language definitions, such as en-BE (English for Belgium) and other similar non-standard languages. We also configured language fallback, used the Enforce Version Presence field where appropriate and generally made lots of content and globalization changes.

Suddenly we noticed that language versions seemed to be disappearing for no apparent reason. This happened several times and we could rule out human error after analyzing backups and log files. We had good help from Sitecore Support but unfortunately the problem wasn’t resolved.

Then we suddenly realized that the disappearing language versions had something in common. They all belonged to language definitions that initially were created with all lowercase names, such as en-be instead of en-BE.

It’s not possible to change this using Sitecore’s Content Editor once the language definition is created, and since we had a lot of translated content we didn’t want to delete and recreate those languages. The only option was to edit the data directly in the databases, which of course is something that should be avoided in any normal circumstances.

Anyhow, we changed all the lowercase language definitions to use two lowercase language letters and two uppercase domain letters and we haven’t had any disappearing language versions since then.

We’re still investigating the root of this error with Sitecore Support. My guess is that there is a bug somewhere deep in Sitecore’s internal language handling that fails when the domain part of the language definition is lowercased.

Regardless, I’ll never create all lowercase language + domain definitions again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s