Developer forum

Forum » Dynamicweb 10 » Enable assortments DW10

Enable assortments DW10

Bjørn Ingebrigtsen
Reply

We have been having problems with assortments not working as expected (products displaying correctly then dissapearing after index rebuild or site restart), so we upgraded to the latest DW 10 (10.8) to see if it could help with our issues and now Enable Assortments in settings gives out an error:

 

Management API request failed. Trace ID: 00-d68ca6ac24dd536f436747dde9d6d81f-c14ec31b3d5e3e53-00. System.InvalidOperationException: Unable to resolve mapping definitions for source type 'Dynamicweb.Ecommerce.UI.Models.Settings.AssortmentDataModel'.
   at Dynamicweb.Extensibility.Mapping.MappingService.Map[TDestination](Object source, Type sourceType)
   at Dynamicweb.Extensibility.Mapping.MappingService.Map[TDestination](Object source)
   at Dynamicweb.Ecommerce.UI.Commands.Settings.AssortmentSaveCommand.Handle()
   at Dynamicweb.Management.Api.Controllers.Api.DataController.GetCommandResult(Type commandType, Type queryType, String body)
   at Dynamicweb.Management.Api.Controllers.Api.DataController.Post(String command, Object body)
   at lambda_method97(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()

Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

That is definitely a bug.

It has now been registered as bug #21379

The "Enable assortments" setting is still saved correctly. It's only the response handling which fails - after the setting has been saved.
So you can just ignore the error for now. We will of course provide a fix as soon as possible.

Thanks for reporting this issue.

/Morten

 
Bjørn Ingebrigtsen
Reply

Thanks Morten!

Then perhaps you could help me figure out why the assortment is not working as expected. I have a test user tied to an assortment with 25 products. Assortment is enabled, and the query has the macro for filtering assortments enabled. The menu items/groups are showing, but no product. I am able to print the assortment items by user (assortmentservice.GetAssortmentIdsByUser) and the list returns 50 items (we 2 languages for the site).

Turning off the query macro, I get products (I get all as expected). This feature was working before I upgraded to 10.7/8

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Well, this is embarrassing.

We have somehow introduced a bug in the macro for assortments, so it currently doesn't work - and there doesn't seem to be a workaround other than implementing your own custom macro.

This has been registered as bug #21382 and will be fixed as soon as possible.

/Morten

 
Bjørn Ingebrigtsen
Reply

Thank you for getting back to me so quickly. I'll see if I can code a macro to do this for now.

 

You must be logged in to post in the forum