Try our conversational search powered by Generative AI!

Failure during upgrade Commerce 12.3 -> 12.4

Fixed in

EPiServer.Commerce 12.4.1

(Or a related package)

Created

Jul 12, 2018

Updated

Jul 23, 2018

Area

Core

State

Closed, Fixed and tested


Description

Steps to reproduce:

  1. Have a Commerce site with a version less than 12.4.
  2. Go into editing mode.
  3. Go to Commerce > Marketing.
  4. Create a new Campaign and give it a name.
  5. When the edit page opens, close the browser window.
  6. A new campaign has been created but without values for ValidFrom and ValidUntil.
  7. Upgrade to 12.4 or later.

The following error occurs:
Update promotion priority failed with exception 'System.ComponentModel.DataAnnotations.ValidationException: The valid from date cannot be empty. at EPiServer.Core.ContentProvider.ThrowValidationException(ICollection`1 errors) at EPiServer.Core.ContentProvider.Validate(IContent content, ContentSaveValidationContext saveValidationContext) at EPiServer.Core.Internal.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access) at EPiServer.Commerce.Internal.Migration.Steps.MigrateTargetMarketsStep.MigrateTargetMarket(SalesCampaign campaign) at EPiServer.Commerce.Internal.Migration.Steps.MigrateTargetMarketsStep.Execute(IProgressMessenger progressMessenger)'.