SaaS CMS has officially launched! Learn more now.

Commerce +13.32.3 - Validation of minquantity not working correctly, cant update catalog entries programmatically in Swedish



We have any issue with validation of the MinQuantity property of a Catalog Entry through the Service API. This is currently breaking our PIM -> EPI integration. 
No matter what number we pass in as MinQuantity we get the same error. This issue began in any of the versions between 13.32.3 - 13.32.5. If I revert back to 13.32.2 then everything is working again and the validation message won't trigger. 

In release notes for COM-15627 I can read that there has been a similar issue with Weight. 

There's also the issue that you cannot update a catalog entry using the UI in Swedish. You get the same validation error. However it works by setting the UI language to English. I've read another post on this forum regarding this issue but in Finnish.

The application we use has culture set to sv-SE by default. My guess it that this is being used as the context language when updating programmatically through the ServiceAPI and that will trigger the validation message.

Only solution as I see is to revert back to 13.32.2 or maybe set the server to "en" as default language.

Edit: Set global culture to en-US instead of sv-SE and as expected it seems to be working again. So the issue is definately in MinQuantity validation for other languages than English.


Attaching Stacktrace:

2022-11-08 08:03:10,224 [168] ERROR EPiServer.ServiceApi.Commerce.Controllers.Catalog.EntryController: The field MinQuantity must be positive number.
System.ComponentModel.DataAnnotations.ValidationException: The field MinQuantity must be positive number.
   at EPiServer.Core.ContentProvider.ThrowValidationException(ICollection`1 errors)
   at EPiServer.Core.Internal.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access)
   at EPiServer.ServiceApi.Commerce.Controllers.Catalog.Persistence.CatalogModelCommmitterBase.<>c__DisplayClass12_0`2.<UpdateCultureSpecificProperties>g__UpdateProperty|1(CultureInfo language, T contentWithLanguage)
   at EPiServer.ServiceApi.Commerce.Controllers.Catalog.Persistence.CatalogModelCommmitterBase.UpdateCultureSpecificProperties[T,TModel](T catalogContent, TModel catalogNode)
   at EPiServer.ServiceApi.Commerce.Controllers.Catalog.Persistence.EntryModelCommitter.SaveCatalogEntry(Entry catalogEntry)
   at EPiServer.ServiceApi.Commerce.Controllers.Catalog.EntryController.PostCatalogEntry(Entry catalogEntry)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
Edited, Nov 08, 2022 7:23

We created bug COM-16423 and will fix it shortly in 13.32.7.

Nov 08, 2022 9:49
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.