leekelleher / umbraco-contentment

Contentment for Umbraco - a state of happiness and satisfaction
https://marketplace.umbraco.com/package/umbraco.community.contentment
Mozilla Public License 2.0
157 stars 72 forks source link

Selecting .Net Enumeration as the Data Source for Data List results in #281

Closed robertjf closed 2 years ago

robertjf commented 2 years ago

Which Contentment version are you using?

4.2.0

Which Umbraco version are you using? For example: 8.14.1 - don't just write v8

10.3

Bug summary

When attempting to create a Data Type with the Contentment Data List using the .Net Enumeration Data Source, the following exception is thrown from the server:

ExceptionMessage: Culture is not supported. (Parameter 'name')\n1 is an invalid culture identifier.
ExceptionType: System.Globalization.CultureNotFoundException, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
    at System.Globalization.CultureInfo.GetCultureInfo(String name)
    at System.Reflection.RuntimeAssembly.GetLocale()
    at System.Reflection.RuntimeAssembly.GetName(Boolean copiedName)
    at Umbraco.Community.Contentment.Web.Controllers.EnumDataSourceApiController.GetAssemblies()
    at lambda_method30352(Closure, Object, Object[])
    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
    --- End of stack trace from previous location ---
    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()
    --- End of stack trace from previous location ---
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Steps to reproduce

Add a Data List Pick a .Net Enumeration as the Data Source.

** UI doesn't refresh with list of Enums to pick from.

image

image Screen Shot 2022-10-21 at 12 27 11 pm

Expected result / actual result

No response

Do you have Umbraco ModelsBuilder enabled?

What browsers are you seeing the problem on?

Microsoft Edge

robertjf commented 2 years ago

Seems this was related to a wierd build locally - rebuilt and tried again without any problems