Error on some admin modules after Kentico 10 upgrade

Cassandra Snyder asked on November 15, 2017 19:50

After upgrading to Kentico 10 from 9 and trying to finish the upgrade process by running the website, I get the expected Invalid License Key page and try to pull up the licenses module in the admin console. Below you can see the error I am getting:

Image Text

The upgrade ran successfully and I made edits to the files the Code Upgrade Tool identified would need adjustments after the upgrade process finished. This error is showing for all configuration modules except Event Log, Settings, and Time Zones. Here's a stack trace from the error in the Event Log:

Event ID: 4344

Event type: Error

Event time: 11/15/2017 12:42:38 PM

Source: PortalEngine

Event code: LOADLAYOUT

Description: Message: Could not load type 'CMS.PortalControls.CMSAbstractLayout'.

Exception type: System.Web.HttpParseException

Stack trace: at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at CMS.Base.Web.UI.ControlDefinition.Load(Page page) at CMS.PortalEngine.Web.UI.CMSPagePlaceholder.LoadLayout(String url)

Message: Could not load type 'CMS.PortalControls.CMSAbstractLayout'.

Exception type: System.Web.HttpParseException

Stack trace: at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)

Message: Could not load type 'CMS.PortalControls.CMSAbstractLayout'.

Exception type: System.Web.HttpException

Stack trace: at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError) at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)

Event URL: /CMSModules/AdminControls/Pages/UIPage.aspx?displaytitle=false&elementguid=393f4bd7-a005-4f1b-ab0c-eaace2509f57

URL referrer: website/Admin/CMSAdministration.aspx

User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

What is causing this?

Recent Answers


Brenden Kehren answered on November 15, 2017 20:53

Do you have custom webpart layouts you're using?

Did all the code files build properly when you updated the code?

Did you check the virtual files back in after you used the code upgrade utility?

0 votesVote for this answer Mark as a Correct answer

Alistair DeJonge answered on June 26, 2018 19:04

I'm experience the same thing. Several of the apps I try to access, including Licenses, System, and Sites I get the same error.

To answer your questions Brendan:

I do have custom webpart layouts, but they were not being used. All the code appeared to build properly, after fixing several things. How do I check the virtual files back in if I cannot access System?

0 votesVote for this answer Mark as a Correct answer

Alistair DeJonge answered on June 27, 2018 15:53

So I discovered that the upgrade did not seem to fix all the ascx files inside the CMSVirtualFiles folder. CMS.PortalControls no longer exists, it has been moved to CMS.PortalEngine.Web.UI, so it needs to be: CMS.PortalEngine.Web.UI.CMSAbstractLayout. You need to update all the references inside the ascx files. Doing a search and replace should do it

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 27, 2018 15:56

Kentico's upgrade path has NEVER fixed any of the virtual files. You have to update those manually due to the complexity of them. Similar to how you have to upgrade your own custom files. It doesn't matter of those virtual files were part of the initial Kentico install or not, the upgrade will NEVER correct any text in those files.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.