Login Errors After Upgrading to DNN Version 9.3+

Overview

After upgrading to DNN version 9.3+, an issue may arise where users encounter an DNN Error error when attempting to log in. This error is typically related to outdated references to ControlPanel in the site's skin files. In DNN version 9+, the Control Bar has been replaced by the Persona Bar, and any remaining ControlPanel references can cause compatibility issues, leading to login errors.

 

Diagnosis

The following error is seen in the logs after a login attempt:

DotNetNuke.Services.Exceptions.Exceptions - ~/Default.aspx?tabid=89&error=Object+reference+not+set+to+an+instance+of+an+object.&content=0
System.NullReferenceException: Object reference not set to an instance of an object.
at DotNetNuke.Web.Client.ClientResourceManagement.ClientResourceManager.RegisterStyleSheet(Page page, String filePath, Int32 priority, String provider, String name, String version)
at DotNetNuke.Web.Client.ClientResourceManagement.ClientResourceManager.RegisterStyleSheet(Page page, String filePath)
at Evoq.PersonaBar.UI.Controllers.EvoqPersonaBarContainer.Initialize(UserControl personaBarControl)
at Dnn.PersonaBar.UI.UserControls.PersonaBarContainer.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at DotNetNuke.UI.Skins.Skin.InjectControlPanel()
at DotNetNuke.UI.Skins.Skin.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at DotNetNuke.Framework.DefaultPage.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Solution

To resolve the login errors caused by these outdated references, follow these steps:

  1. Locate and Edit .ascx Files:

    • Navigate to the Skins folder in your DNN installation directory.
    • Open each .ascx file within the folder using a text editor.
  2. Remove ControlPanel References:

    • Search for any instances of ControlPanel, for example:
      <div class="art-controlpanel-container"> <dnn:CONTROLPANEL runat="server" id="cp" /> </div>
    • Delete the entire block of code or any other variations that reference ControlPanel.
  3. Save Changes and Recycle Application Pool:

    • After making the necessary changes, save the files.
    • Recycle the application pool associated with your DNN site to apply the changes.

Testing

Attempt to log in to the site again. The error should no longer occur, and the site should function normally.

Comments

0 comments

Please sign in to leave a comment.