I have this weird problem. only portal 0, which is luckily the least important one of the lot, isn't working anymore.
When I try to connect a page with DNN Error appears, and I get Default.aspx?tabid=2558&error=An%20unexpected%20error%20has%20occurred all over my IIS logs.
Looking around on the various forums people suggested it might be a DB connection problem, which it can't because this portal is using the same AppPool as other portals that are working fine.
Looking through the event log I get a bunch of errors, all of them Page Load Exceptions with different stack traces, many of them with similar inner messages stating "Object reference not set to an instance of an object".
In some cases the portalID appears as -1, in others it appears correctly as 0.
I'll try pasting some of the different error stack traces
AbsoluteURL:/Default.aspx DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke ExceptionGUID:1792f8c4-7add-4382-8da0-5f33b9f35556 AssemblyVersion: PortalId:-1 UserId:-1 TabId:-1 RawUrl: Referrer: UserAgent: ExceptionHash:b+fp0FFsgUklzso1trF8+A== Message:Object reference not set to an instance of an object. StackTrace: InnerMessage:Object reference not set to an instance of an object. InnerStackTrace:
at DotNetNuke.UI.Skins.Skin.GetSkin(PageBase page) 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) Source: FileName: FileLineNumber:0 FileColumnNumber:0 Method: -------------------------------------------------------------------
AbsoluteURL:/Default.aspx DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke ExceptionGUID:c8cb1cd2-f5ff-4e2a-b07a-d5ee95dbbfb8 AssemblyVersion: PortalId:-1 UserId:-1 TabId:-1 RawUrl: Referrer: UserAgent: ExceptionHash:UOug4h4W752hL/Yl5eKXag== Message:Unhandled error loading page. StackTrace: InnerMessage:The file '/Portals/_default/Skins/MinimalExtropy/index.ascx' does not exist. InnerStackTrace:
at System.Web.UI.Util.CheckVirtualFileExists(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 DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Skins.Skin.LoadSkin(PageBase page, String skinPath) Source: FileName: FileLineNumber:0 FileColumnNumber:0
------------------------------------------------
AbsoluteURL:/Default.aspx DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke ExceptionGUID:1320a854-f1ab-42c3-a25e-b677853dcf21 AssemblyVersion: PortalId:-1 UserId:-1 TabId:-1 RawUrl: Referrer: UserAgent: ExceptionHash:lifW6NEbnwuCCwOUxdbhHw== Message:Unhandled error loading page. StackTrace: InnerMessage:Object reference not set to an instance of an object. InnerStackTrace:
at System.Web.UI.TemplateControl.LoadControl(IWebObjectFactory objectFactory, VirtualPath virtualPath, Type t, Object[] parameters) at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Skins.Skin.LoadSkin(PageBase page, String skinPath) Source: FileName: FileLineNumber:0 FileColumnNumber:0
I have no idea what happened since all the other portals on the same application installation are running.
Can I simply delete portal 0? Had it been another portal I would have done so already and restarted from scratch but I'm a little concerned about deleting portal 0 because it's the main one in Host Details. Can I simply substitute it with another one and delete it or will it cause more problems?
I have never been properly certain how those various skin files are supposed to be used. So what follows is guesswork and conjecture. I think the skin file named index is intended for use on a home page. And so probably the home page, and only the home page, has an override to force use of that skin. I suspect that override would appear in the tab settings table rather than the portal settings. I don't know if this still works, but I believe you can override the skin via the url. Try adding ?SkinSrc=Portals/_default/Skins/MinimalExtropy/index full, or similar, to the URL. My notes don't mention the '.ascx' extension. You might have to play about with this. And maybe it no longer works.
Did you check the Config/DotNetNuke.config file?
Did you check the PortalAlias table?
Posted By EdoDNN on 7/6/2024 12:25 AM Oh wow Timo... that was it! What does this Config/DotNetNuke.config file do?
That's the fallback skin, which loads when the assigned Skin fails.
Did you replace it with another skin (that exists)? (you should :-)
The path "/dotnetnuke/Portals/_default/Skins/DarkKnight/Home-Mega-Menu.ascx" looks incorrect, normally that should have been
/Portals/_default/Skins/DarkKnight/Home-Mega-Menu.ascx as Portals in in the root of the installation
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.