Edit: Object reference not set to an instance of an object

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/3/2011 3:57:39 PM
Gravatar
Total Posts 3

Edit: Object reference not set to an instance of an object

Hi all

I was editing my page at home location and used the "edit" to go and edit some text. When Update button is pressed, some error appears and the log show's this:

 

2011-01-03 21:49:54,957 ERROR mojoPortal.Web.mojoBasePage - 93.102.54.246-en-US - /mojo2358/HtmlEdit.aspx?mid=0&pageid=0
System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.ContentUI.EditHtml.SaveHtml(Boolean draft)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2011-01-03 21:49:54,957 ERROR mojoPortal.Web.Global - 93.102.54.246-en-US - /mojo2358/HtmlEdit.aspx?mid=0&pageid=0
System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.ContentUI.EditHtml.SaveHtml(Boolean draft)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Thanks

Adelino

 

1/4/2011 7:02:26 AM
Gravatar
Total Posts 18439

Re: Edit: Object reference not set to an instance of an object

Hi Adelino,

Here is my best guess of the problem.

You edit your site sometimes from home and sometimes from work. At work you changed your username or email address on your user account. When you got home you were still logged in as the old user name because you had a persistent cookie because you check the remember me box when you login. So when you go to edit it sees from your cookies that you are authenticated and you are in a role with edit permissions but when you save content it cannot find your site user because your cookie no longer matches an existing site user (because you changed it at work) so it gets a null user object and causes this error. 

The solution is to click the logout link then login again, or else clear your browser cookies then login again. Then you will be able to edit again without errors.

Hope it helps,

Joe

1/4/2011 3:11:36 PM
Gravatar
Total Posts 3

Re: Edit: Object reference not set to an instance of an object

Thank you.

I logged with admin in IE on the virtual machine and it worked. I usually use my laptop to work on remote desktop and Firefox to view the pages. And it was probably that the problem.

I'm testing mojoportal to see if it is really an alternative to dotnetnuke and joomla. Those other cms have great looks and features too, but mojo is amazingly simple. It has lot's of themes too.

Anyway, you all have done an excellent job!

Thanks

Adelino

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