Friday, May 29, 2009

Resetting DotNetNuke After Uploading a Broken Skin

Today, after uploading a Skin file to DotNetNuke, it threw this exception when rendering the Home page:

DotNetNuke Error: - Version 04.09.02



An error has occurred.
DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Common.Globals.CreateValidID(String strID) at DotNetNuke.UI.Skins.Controls.Styles.AddStyleSheet() at DotNetNuke.UI.Skins.Controls.Styles.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

I couldn't get back to Admin>Skins to reset the skin, so I had to find a way to reset the skin without the Admin interface.
I reset DotNetNuke to the default skin by deleting the folder under /Portals/0/Skins/. From there I could explode the 'nuke again.