FOund the solution - need to add to the root initialisation
Please add line
setting.AllowedContentTypeNames.Add("CommerceReportingFolder");
This is need when going to version 12.6.0 or above
using BaseContentTypes.Models.Pages;
using EPiServer;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.ServiceLocation;
using EPiServer.DataAbstraction;
namespace Web.Business.Initialization
{
[InitializableModule]
[ModuleDependency(typeof(EPiServer.Data.DataInitialization))]
public class RootPageInitialization : IInitializableModule
{
public const string RootPage = "SysRoot";
public void Initialize(InitializationEngine context)
{
var setting = new AvailableSetting {Availability = Availability.Specific};
var serviceLocator = ServiceLocator.Current;
var contentRepository = serviceLocator.GetInstance<IContentTypeRepository>();
var startPage = contentRepository.Load(typeof(StartPage));
if (startPage == null)
{
return;
}
setting.AllowedContentTypeNames.Add(startPage.Name);
var localizationContainer = contentRepository.Load(typeof(LocalizationContainer));
if (localizationContainer == null)
{
return;
}
setting.AllowedContentTypeNames.Add(localizationContainer.Name);
setting.AllowedContentTypeNames.Add("CommerceReportingFolder");
var sysRoot = contentRepository.Load(RootPage) as PageType;
var availabilityRepository = serviceLocator.GetInstance<IAvailableSettingsRepository>();
availabilityRepository.RegisterSetting(sysRoot, setting);
}
public void Uninitialize(InitializationEngine context)
{
}
public void Preload(string[] parameters)
{
}
}
}
Hi
Upon Upgrading Episerver commerce from version - 12.0.0 to 12.17.2 we are getting the following error.
Has anyone seen this error and has a resolution for this -
Server Error in '/' Application.
Content type "CommerceReportingFolder" is not allowed to be created under parent of content type "SysRoot"
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: EPiServer.Core.EPiServerException: Content type "CommerceReportingFolder" is not allowed to be created under parent of content type "SysRoot"
Source Error:
Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\d2a0d788\d180033a\App_global.asax.0.cs Line: 0
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4330.0
Regards
Sandeeo