Search code examples
episerver

Upgrade 7.5 to 9 - Content type ImageFile is not allowed to be created under parent of content type SysContentAssetFolder


I've upgraded an EPiServer CMS site from 7.5 to 9, upgrading source code and DB. I don't necessarily need to migrate the Media files.

After the upgrade, everything looks to be working fine, except when I try to add images, documents or try to create blocks.

When adding an image for a page, it fails with the following error: Content type "ImageFile" is not allowed to be created under parent of content type "SysContentAssetFolder".

When I try to add a global Content Block, none of the block types appear. When trying to add it in a content area, there is no button to add new ones.

I've found that if I explicitly allow the Content Type (ImageFile or the content block) under a page type in the tblContentTypeToContentType table, it works. Nevertheless I don't think that the right approach would be to add permissions one per one. We didn't need to in version 7.5.

Hope someone can help with this.

Thanks in advance!


Solution

  • I've found a workaround for now, by inserting the following records:

    INSERT INTO [dbo].[tblContentTypeToContentType] ([fkContentTypeParentID],[fkContentTypeChildID],[Access],[Availability],[Allow])
    VALUES (3,3,2,2,null) -- for SysContentFolder
    
    
    INSERT INTO [dbo].[tblContentTypeToContentType] ([fkContentTypeParentID],[fkContentTypeChildID],[Access],[Availability],[Allow])
    VALUES (4,4,2,2,null) -- for SysContentAssetFolderNevertheless 
    

    I'm not sure this is the correct fix, and if it could have unwanted consecuences.