1

In previous versions of Sitecore (we're on 8.2), when importing a language XML file, the default database for import was master. In 8.2 the dialogue always opens with the core database selected. Almost all of our imports are for the master database, and messy mistakes have been made.

How can I set the default database for language import to master, to avoid accidentally installing a load of content in core?

1

It looks like it is not configurable. But I can suggest you few workarounds:

First is changing configuration of Sitecore. Databases list on ImportLanguage form uses Factory.Instance.Value.GetDatabaseNames() Sitecore API. This API gets databases from Sitecore configuration. When you open Sitecore.config and change order of database nodes /sitecore/databases/database[id='core'] with /sitecore/databases/database[id='master']

Second is more complex:

  1. Inherit your new form from Sitecore.Shell.Applications.Globalization.ImportLanguage.ImportLanguageForm, Sitecore.Client
  2. Override OnLoad function, fix order. string[] databaseNames = Factory.GetDatabaseNames();
  3. Open '\sitecore\shell\Applications\Globalization\ImportLanguage\ImportLanguage.xml' and change CodeBeside property to use your new class

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.