Error editing HTML Content - System.NullReferenceException:

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.
2/13/2011 12:30:33 PM
Gravatar
Total Posts 21

Error editing HTML Content - System.NullReferenceException:

MS Server 2003

MSSql 2005

Mojo 2.3.6.2

Can create pages, add content, but when I go to edit the content (when I click SAVE):

2011-02-13 13:25:03,874 ERROR mojoPortal.Web.mojoBasePage - 173.56.4.235-en-US - /HtmlEdit.aspx?mid=3&pageid=0
System.NullReferenceException: Object reference not set to an instance of an object.
   at mojoPortal.Web.ContentUI.EditHtml.SaveHtml(Boolean draft)
   at mojoPortal.Web.ContentUI.EditHtml.btnUpdate_Click(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2011-02-13 13:25:03,890 ERROR mojoPortal.Web.Global - 173.56.4.235-en-US - /HtmlEdit.aspx?mid=3&pageid=0
System.NullReferenceException: Object reference not set to an instance of an object.
   at mojoPortal.Web.ContentUI.EditHtml.SaveHtml(Boolean draft)
   at mojoPortal.Web.ContentUI.EditHtml.btnUpdate_Click(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

2/13/2011 12:43:41 PM
Gravatar
Total Posts 18439

Re: Error editing HTML Content - System.NullReferenceException:

Hi Bob,

The only thing I know that causes this error is if the current user is null when it tries to save. And the only thing I know that can cause that is if you changed the user email account or user name from one browser but had another browser where the user was still logged in with a persistent cookie under the old name. So the cookie says you are authenticated and have permissions but since it no longer matches your user the user is null and causes this error.

The solution is to log out and log in again so your cookie matches the user, then you should be able to save with no errors.

Hope it helps,

Joe

2/13/2011 12:50:24 PM
Gravatar
Total Posts 21

Re: Error editing HTML Content - System.NullReferenceException:

Joe,

   Right on the head!  Cleared the cookies and Voila...  By the time I know what the heck I am doing, you are going to be drunk from all the beer!  Thanks again, the level of support you provide is incredible.

BoB

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