November Happy Hour will be moved to Thursday December 5th.

GetDefault when content implements ILocale, but now ILocalizable does not set language

Fixed in

EPiServer.CMS.Core 10.0.1

(Or a related package)

Created

Jun 20, 2016

Updated

Oct 27, 2016

Area

CMS Core

State

Closed, Fixed and tested


Description

When creating a content item of a content type that implements ILocale but not ILocalizable, such types based on MediaData, the language is not initialized.

var english = CultureInfo.GetCultureInfo("en");
var content = contentRepository.GetDefault<MyImageData>(parentLink, english);
 
// Expected
Debug.Assert(content.Language.Equals(english));
 
// Actual 
Debug.Assert(content.Language.Equals(CultureInfo.InvariantCulture));

Same is true when calling CreateLanguageBranch (See CMS-3859, but this should probably throw instead)