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

Default values for Commerce content only work for selected language when content is created

Found in

EPiServer.Commerce 13.17.0

Fixed in

EPiServer.Commerce 13.29.0

(Or a related package)

Created

Nov 06, 2020

Updated

Feb 09, 2021

Area

Core

State

Closed, Fixed and tested


Description

Fix for making default values for Commerce content work for selected languages.

Steps to reproduce:

  1. On the Commerce Quicksilver sample site, make sure there are multiple languages enabled for catalog content (en, sv - where en is master and selected language).
  2. Create some content which inherits from NodeContent like:
public class TestContent : NodeContent 
{
     [CultureSpecific] 
     public virtual string Text {get;set;}

     public override voide SetDefaultValues(ContentType contentType)
     {   
        Text = "Some text";
        base.SetDefaultValues(contentType);   
     }
}

          3. Create TestContent in catalog.

Expected:

Should set default value for all language versions (en, sv).

Actual:

Only sets it for the selected language (en) when creating the content (not for sv).