Developer forum

Forum » CMS - Standard features » Error when adding new facets to facet group

Error when adding new facets to facet group

Roald Haahr
Reply

When a new field facet is added to a facet group without selecting a Field, an error will occur that will leave the facet group's configuration screen blank when opened again. As a result the facet group can no longer be edited in the UI.

Steps to reproduce

  1. Open the configuration screen of a facet group
  2. Add new field facet.
    1. Leave the Field dropdown without a value
  3. Press OK and 'Save and close' the facet group configuration
  4. Reopen the facet group configuration. It will now be completely blank of data.

This behaviour is observed in v9.12.5 and v9.17.5. Is it fixed in a newer version?

I agree that it makes little sense to create a field facet that does not point at a field, but we have a client that has started to make the facets before the fields, which is why this error has been observed. See the error below.

Kind regards
Roald

 

Error
{"Message":"An error has occurred.","ExceptionMessage":"Value cannot be null.\r\nParameter name: key","ExceptionType":"System.ArgumentNullException","StackTrace":"   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)\r\n   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)\r\n   at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)\r\n   at Dynamicweb.Indexing.Querying.Faceting.FacetGroupHelper.ConvertToFacets(XElement obj)\r\n   at Dynamicweb.Indexing.Querying.QueryService.LoadFacets(String fileName)\r\n   at Dynamicweb.Admin.FacetsController.GetFacets(String repository, String item)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"}


Replies

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

new task #22148 has been submitted to fix the issue ("Field" should be required like it's done in DW10 nowadays). Thanks.

BR, Oleg QA

 

You must be logged in to post in the forum