Try our conversational search powered by Generative AI!

AllowedTypes got an error when drag and drop in Form Editing

Found in

Release 7.5

Created

Apr 16, 2014

Updated

Feb 23, 2015

Area

Falcon/CMS/Edit UI/Drag and Drop

State

Closed, Fixed and Tested


Steps to reproduce

This bug is reported here:

http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=80032&epslanguage=en

AllowedTypes got an error when drag and drop in Form Editing

've tried this with standard Alloy installation and there is weird thing. Simply edit the PageListBlock, and put AllowedTypes (typeof(ArticlePage)) to the property "Root" which is PageReference. 

When I go to Form Editing, try to drag and drop my Article page to the property, I got an error: 

Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'EPiServer.Core.PageReference' because the type requires a JSON string value to deserialize correctly. To fix this error either change the JSON to a JSON string value or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path 'isPreferredLanguageAvailable', line 1, position 32. 

The page picker is still working as expected with restriction of content type. I know there is a known bug with drag and drop in Edit view. But what about Form editing? Does anyone know why and how to fix it?