November Happy Hour will be moved to Thursday December 5th.

EpiServer Forms cant add items to ChoiceElementBlock

Vote:
 

When adding Items to ChoiceElementBlock or SelectionElementBlock, dojo get error on post to http://localhost:58421/EPiServer/cms/Stores/contentdata/16198_25333

Pay load

  • {id: "16198_25333", properties: {items: "[{"caption":"Test","value":"99","checked":false}]"},…}
  • id"16198_25333"
  • properties{items: "[{"caption":"Test","value":"99","checked":false}]"}
  • items"[{"caption":"Test","value":"99","checked":false}]"
  • publishChangesfalse

EpiServer return 500

Get an exception {"Value cannot be null.\r\nParameter name: value"}

at System.ComponentModel.DataAnnotations.ValidationContext.set_DisplayName(String value)
at EPiServer.Validation.DataAnnotationsValidator`1.ValidateInstance(Object instance, List`1 validationResult, ValidationContext validationContext)
at EPiServer.Validation.DataAnnotationsValidator`1.ValidateInstance(Object instance, List`1 validationResult, ValidationContext validationContext)
at EPiServer.Validation.DataAnnotationsValidator`1.Validate(T instance)
at EPiServer.Validation.ValidatorWrapper`1.Validate(Object instance)
at EPiServer.Validation.ValidationService.ValidateRecursively(Object instance, HashSet`1 visitedInstances)
at EPiServer.Validation.ValidationService.Validate(Object instance)
at EPiServer.Cms.Shell.UI.Rest.ContentChangeManager.UpdateContentProperties(ContentReference contentReference, IDictionary`2 properties, SaveAction saveAction)
at EPiServer.Cms.Shell.UI.Rest.ContentChangeManager.UpdateContentProperties(ContentReference contentReference, IDictionary`2 properties)
at EPiServer.Cms.Shell.UI.Rest.ContentDataStore.Patch(PatchContentDataModel entity)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.b__32(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at EPiServer.Shell.Services.Rest.RestControllerBase.EndExecute(IAsyncResult asyncResult)
at EPiServer.Shell.Services.Rest.RestHttpHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)r`

#143609
Jan 27, 2016 15:59
Vote:
 

Could you please let me know the CMS (EPiServer.CMS.UI & EPiServer.Framework) version?

#143699
Jan 29, 2016 8:12
Vote:
 

EPiServer.UI 9.3.7.0 & EPiServer.Framwork 9.6.0.0

#143709
Jan 29, 2016 9:09
Vote:
 

Now it works :/ havn't done anything..

#143779
Feb 01, 2016 8:51
Vote:
 

Indeed I could not duplicate the issue, but with it works without done anything I just suggest it is browser cache.

#143781
Feb 01, 2016 9:02
Vote:
 

I get the same error. 

I have tried to do nothing, but the error remains...

The same error occurs when I add items to a SelectionElementBlock.

I'm using EPiServer.UI 9.3.1 & EPiServer.Framework 9.3.2.

When I think of it, the same thing happens when I use a ContentReferenceList in a block and use that block as a property on a page. 

#144132
Feb 08, 2016 12:53
Vote:
 

Hi Jonas,

Though the SelectionElementBlock currently does not use the ContentReferenceList we really want to see this potential error. Unfortunately I am also fail trying reproduce the same error using the ContentReferenceList as your short description, I neither see any registed relative bug for this property type.

It would be helpful with your more step/description/code. Thanks!

#144608
Feb 16, 2016 8:24
Vote:
 

I also get this problem when using a contentreferencelist in a local block property. After the initial save, when re-opening the property, it's empty and the below error message is displayed in console. The initial save of contentreferences works, and the property works correctly in the all properties view. But using it in dope mode returns the above error. Even worse is that if I change a different value in dope and save the page, the contentreferencelist property in the local block property is saved empty.

[ArgumentNullException: Värde får inte vara null.
Parameternamn: ids]
   EPiServer.Cms.Shell.UI.Rest.ContentStructureStore.List(IEnumerable`1 ids) +1036
   lambda_method(Closure , ControllerBase , Object[] ) +119
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +229
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +71
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +386
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +386
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +38
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +186
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   EPiServer.Shell.Services.Rest.RestControllerBase.EndExecute(IAsyncResult asyncResult) +60
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +137

                        
#144776
Edited, Feb 18, 2016 16:09
Vote:
 

@Eric: With your information I can reproduce the issue, and raised as bug CMS-2930 ContentReferenceList does not work when used as a property in a Local Block.

This issue merely does not relate to the ChoiceElementBlock though, not sure Thorbjørn had used the ChoiceElementBlock as a local block or not, but I do not think the ChoiceElementBlock has been ready for this pupose.

Thank all for notifying us about this!

#144817
Feb 19, 2016 12:20
Vote:
 

@GP

Great news! Thanks :)

#144888
Feb 22, 2016 10:33
Vote:
 

I encountered the same problem when using Episerver UI language in Norwegian. Succeeding to avoid the problem men changing the UI language to English. I have registered a support case for this.

#146913
Mar 30, 2016 17:02
Vote:
 

From support: 
There's a bug created around this issue AFORM-468 the bug has been made public and the developers are working on it

#146915
Mar 30, 2016 17:08
Vote:
 

UPDATE: AFORM-468 is fixed and close by CMS 9.9 (it does not related to Forms).

CMS-2930 is closed as "won't fix": "Currently we don't support the editing of this kind of nested properties via OPE".

#148446
May 13, 2016 6:43
Vote:
 

@THACH

What kind of explanation is that for CMS-2930? I think there is a missunderstanding in the bug report. I'm not trying to edit a nested property, only a local block property. It's a bug in the platform. All other properties can be edited when in a local block proprety via OPE. Content areas, content references etc etc.

Please have someone look at this again, I can't imagine it's something that's that hard to fix. I think this is the missunderstanding:

This row in the bug is incorrect as far as i can tell: @Html.PropertyFor(x => x.CurrentPage.ImageRefsBlock.ImageRefs) it should be @Html.PropertyFor(x => x.CurrentPage.ImageRefsBlock)

The problem is not when editing one of the properties in the local block directly. Its when you edit the entire local block and all the properties open up. I've attahed a couple of screenshot to make this more clear. This as said previously works for all other properties.

When editing the grouped property (single image, or images as contentrerencelist for slideshow) via dope:

Same grouped property in "All properties"-view:

Thanks

#148448
Edited, May 13, 2016 8:36
Vote:
 

Dear Eric, I will add your comment to the bug and ping someone in CMSt team. I cannot fix it from my addon side.

#148450
May 13, 2016 8:54
Vote:
 

Thank you THACH :)

#148451
May 13, 2016 8:55
Vote:
 
#151534
Jul 27, 2016 10:18
* 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.