Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Object reference not set to an instance of an object.Object reference not set to an instance of an object.
Previous
 
Next
New Post
9/6/2008 3:12 AM
 

Hi guys, don't know if this one can be fixed. A coleague of mine set up a site for a client of ours a while ago and he later resigned, so I had to take over from him. My DNN skills are not that great because I was sot of thrown into the deep end. I have been administrating this site for months without any problems, until one day boom! I get the error below:

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

 
[NullReferenceException: Object reference not set to an instance of an object.]
   DotNetNuke.Entities.Portals.PortalSettings.VerifyPortalTab(Int32 PortalId, Int32 TabId) in C:\Projects\Dotnetnuke\Library\Components\Portal\PortalSettings.vb:842
   DotNetNuke.Entities.Portals.PortalSettings.GetPortalSettings(Int32 TabId, PortalAliasInfo objPortalAliasInfo) in C:\Projects\Dotnetnuke\Library\Components\Portal\PortalSettings.vb:699
   DotNetNuke.Entities.Portals.PortalSettings..ctor(Int32 tabId, PortalAliasInfo objPortalAliasInfo) in C:\Projects\Dotnetnuke\Library\Components\Portal\PortalSettings.vb:530
   DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) in C:\Projects\Dotnetnuke\Library\HttpModules\UrlRewrite\UrlRewriteModule.vb:319
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

Please if there is anyone out there with a solution please help..

 
New Post
9/6/2008 10:30 AM
 

Hi Calvin,

What version of DNN is your site running?  The line numbers in your call stack are not matching up with relevant 4.8.4 code.

If I had to throw out a wild guess, it would be that there is a problem with the HomeTabId setting, perhaps due to the homepage being deleted.  But without knowing the exact version you're running, that is a complete shot in the dark.

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
9/8/2008 4:50 AM
 

Hi Brandon, I am running version 4.5.1 of DNN.

 
New Post
9/8/2008 10:03 AM
Accepted Answer 

Hi Calvin,

I believe you are experiencing the error described in this work item (the line numbers do not match up because the reported version is 4.5.2 instead of 4.5.1).  Regardless, DNN is executing the following code:

objHomeTab = objTabs.GetTab(

Me.HomeTabId, PortalId, False)

And the GetTab method is returning nothing.  This most likely means that the HomeTabId has been deleted, or perhaps that there has been an inappropriate database assignment to the HomeTabId value.

Logging in as host under another portal, or using SQL Management Studio verify the HomeTabId value, the existence of this tab, and the IsDeleted bit on the tab.  You can use the following SQL to retrieve these values:

SELECT Portals.PortalName, HomeTabId, Tabs.TabName, Tabs.TabId, Tabs.IsDeleted FROM Portals
LEFT JOIN Tabs
 ON Portals.HomeTabId = Tabs.TabId
WHERE Portals.PortalID = *** Your problematic portalId **

If you learn via this query that your HomeTabId is nonzero, but the TabId Is NULL or IsDeleted = 1, you can just reset the HomeTabId using this query:

UPDATE Portals SET HomeTabId = NULL WHERE PortalID = ** Your problematic portalId **

Note that both queries assume that you do not have a database prefix installed.  You might need to prepend the prefix to the relevant tables above.

This should fix the problem (if it is a result of the issue described above).  Note that this bug was fixed in a subsequent release, so once you get back and running, you might consider upgrading to a more current DNN version.

Hope this helps!

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
9/9/2008 9:25 AM
 

Hi Brandon, you are a life saver. The site was back up and running in no time. Thank you.

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Object reference not set to an instance of an object.Object reference not set to an instance of an object.


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out