You have created shared block and adding it to page's content area? Or created new local block (in "For This Page" folder) and then trying to add to content area?
We have the same issue. It doesn't affect all blocks, only newly created, even copies of old fully functional blocks get the same error.
But as NickT indicates this issue only affects new blocks on the page and not the shared blocks section.
Problem was solved by removing all rows in "tblContentTypeToContentType" referring to the row in "tblContentType" with the ModelType "EPiServer.Core.ContentAssetFolder,EPiServer", in this case pkID 4.
DELETE FROM tblContentTypeToContentType
WHERE fkContentTypeParentID = 4
After that, do a iisreset and it works as it should again.
Thanks Nicklas! I just encountered the same issue on our development server. Google pointed me to this thread and your SQL query seems to have fixed the issue perfectly!
This was on EPiServer 9.12.2 at 2017-03-09. We haven't yet taken the step to go to EPiServer 10.
Hi, I've create a new block, but when I'm trying to add it on a page, I receive the next exception:
Exception information:b__12()b__14()b__14() >> >> >
Exception type: EPiServerException
Exception message: Content type "MyBlock" is not allowed to be created under parent of content type "SysContentAssetFolder"
at EPiServer.Core.DefaultContentRepository.ValidateContentTypeAvailability(IContent content)
at EPiServer.Core.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access)
at EPiServer.IContentRepositoryExtension.Save(IContentRepository repository, IContent content, SaveAction action)
at EPiServer.Cms.Shell.UI.Rest.ContentChangeManager.CreateContent(ContentReference parentLink, Int32 contentTypeId, Nullable`1 resourceFolderId, Boolean createAsLocalAsset, String name, IDictionary`2 properties, SaveAction saveAction)
at EPiServer.Cms.Shell.UI.Rest.ContentChangeManager.Create(ContentReference parentLink, Int32 contentTypeId, Nullable`1 resourceFolderId, Boolean createAsLocalAsset, String name, IDictionary`2 properties, Boolean autoPublish)
at EPiServer.Cms.Shell.UI.Rest.ContentDataStore.Post(PostContentModel 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.ControllerActionInvoker.<>c__DisplayClass15.
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at EPiServer.Shell.Services.Rest.RestControllerBase.ExecuteCore()
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
at EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContextBase httpContext)
at EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Block has very simple implementation:
[ContentType(GroupName = "....", GUID = ".....")]
public class MyBlock : EPiServer.Core.BlockData
{
}
Does anyone have any ideas what can be a reason of such behavior?