NullReferenceException in SiteMenu.ascx.cs on Login

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
1/10/2007 8:13:13 AM
Gravatar
Total Posts 80

NullReferenceException in SiteMenu.ascx.cs on Login

To reproduce:

1. Create page in the menu that does not check any "Roles that can view this page"
2. Login as user in the ContentAdmin role.
3. See below stack trace.

It looks like "mapNode.Roles" on line 406 of SiteMenu.ascx.cs is null...not sure how that is being set.

-Jesse

Server Error in '/mojodev' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:

Line 400:            //String foo = e.Item.ValuePath;
Line 401:
Line 402: if (!(
Line 403: (isAdmin)
Line 404: || (

Source File: C:\z_drive\mojoportal_2.x\Web\Controls\SiteMenu.ascx.cs    Line: 402

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
mojoPortal.Web.UI.SiteMenu.pageMenu_MenuItemDataBound(Object sender, MenuEventArgs e) in C:\z_drive\mojoportal_2.x\Web\Controls\SiteMenu.ascx.cs:402
System.Web.UI.WebControls.Menu.OnMenuItemDataBound(MenuEventArgs e) +105
System.Web.UI.WebControls.Menu.DataBindRecursive(MenuItem node, IHierarchicalEnumerable enumerable) +4208
System.Web.UI.WebControls.Menu.DataBindRecursive(MenuItem node, IHierarchicalEnumerable enumerable) +4286
System.Web.UI.WebControls.Menu.DataBindRecursive(MenuItem node, IHierarchicalEnumerable enumerable) +4286
System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item) +277
System.Web.UI.WebControls.Menu.PerformDataBinding() +117
System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect() +70
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.Menu.DataBind() +4
mojoPortal.Web.UI.SiteMenu.RenderMenu() in C:\z_drive\mojoportal_2.x\Web\Controls\SiteMenu.ascx.cs:378
mojoPortal.Web.UI.SiteMenu.PopulateControls() in C:\z_drive\mojoportal_2.x\Web\Controls\SiteMenu.ascx.cs:324
mojoPortal.Web.UI.SiteMenu.Page_Load(Object sender, EventArgs e) in C:\z_drive\mojoportal_2.x\Web\Controls\SiteMenu.ascx.cs:289
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
1/10/2007 8:55:47 AM
Gravatar
Total Posts 18439

Re: NullReferenceException in SiteMenu.ascx.cs on Login

This is now fixed in svn branches/2.x

Thanks!

Joe
You must sign in to post in the forums. This thread is closed to new posts.