Server error when trying to save any text editor output

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.
3/22/2008 6:39:54 PM
Gravatar
Total Posts 33
www.jaosobne.cz
Windows Server 2008 R2
Microsoft SQL Server 2008
MojoPortal 2.3.6.2

Server error when trying to save any text editor output

Hi, I'm new to MojoPortal. I set up myself a website with two child sites. When I first tried everything forked fine, I managed to delete the welcome message from homepages. I made some settings and changed skin, but I am not aware of changing anything which could broke up text editors. I only manually changed Password format for the child sites in DB since it was disabled in Mojo Administration (and I also manually changed uswr's passwords).

Now, when I try to save Blog / HTML Content (did not try any of the others), I get an Server error, no matter which content editor I use. Could you please analyze the error and give me some advice? Thank you.

jaosobne.cz, mujzune.cz: Windows Server 2008 (IIS7), SQL Server 2008.

Server Error in '/' 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:

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.]
mojoPortal.Business.WebHelpers.IndexBuilderConfiguration.GetConfig() +236
mojoPortal.Business.WebHelpers.IndexBuilderManager.Initialize() +31

[TypeInitializationException: The type initializer for 'mojoPortal.Business.WebHelpers.IndexBuilderManager' threw an exception.]
mojoPortal.Business.WebHelpers.IndexBuilderManager.get_Providers() +0
mojoPortal.Web.ContentUI.EditHtml.btnUpdate_Click(Object sender, EventArgs e) +473
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +131
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +39
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3215

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434

3/22/2008 10:54:08 PM
Gravatar
Total Posts 10

Re: Server error when trying to save any text editor output

I was having similar symptoms recently.  I can't say if it was the same actual problem since I don't recall the details of the exception thrown.  However, strangely enough, clearing the system log seemed to fix it for me.

3/24/2008 2:15:13 AM
Gravatar
Total Posts 33
www.jaosobne.cz
Windows Server 2008 R2
Microsoft SQL Server 2008
MojoPortal 2.3.6.2

Re: Server error when trying to save any text editor output

lmcfarlin: Thank you for your help. My request was targeted on Joe, since I don't know if anyone else than the author himself is able to really see the error in th stack trace. Unoftunately I have noticed in older threads, that Joe isn't responding to this kind of errors. MojoPortal is a good project, I really appreciate the simplicity compared to for example DotNetNuke, which is a real giant. I also considered donation if I decided to stick with Mojo and run some projects on it. Now I spent a day working on my customized skin and everything I have is website with no possibility to create content - and since I spent couple hours configuring it, I'm not yet ready to just reinstall it and start from scratch - especially when I don't know, what is broken. I found the error report of Mojo's own. Joe, please, could you look at it and make some suggestions? Thank you.

2008-03-23 00:46:54,134 [1896] ERROR mojoPortal.Web.Global [(null)] - xxx-cs-CZ - /HtmlEdit.aspx?mid=5&pageid=5
System.TypeInitializationException: The type initializer for 'mojoPortal.Business.WebHelpers.IndexBuilderManager' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Business.WebHelpers.IndexBuilderConfiguration.GetConfig()
at mojoPortal.Business.WebHelpers.IndexBuilderManager.Initialize()
--- End of inner exception stack trace ---
at mojoPortal.Business.WebHelpers.IndexBuilderManager.get_Providers()
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.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

3/24/2008 6:10:39 AM
Gravatar
Total Posts 18439

Re: Server error when trying to save any text editor output

Hi,

Its not that I'm not responding to this kind of error. I respond to any post where I think I can help someone. The problem is if I can't reproduce an error then its very difficult to fix a problem. Please understand I am involved with a lot of web sites running mojoportal and this error is not happening for me on any of them so it makes me think you are doing something different than me with your configuration or your environment but you are not telling me about it so I am not able to make this error happen and therefore can't find the cause of the problem.

Here is what I do know.

This error is occuring after you edit content when it executes code that should update the search index. The search index files live in the file system under Data/Sites/[SiteID]index where SiteID is probably 1 and 2 since you have 2 sites. The error could be caused by several possible things that I can think of and maybe others that I can't think of.

1. Are there any missing configuration files? There should be a configuration file for each feature that is searchable under Web/Setup/indexbuilderconfig folder. Also if the permissions on these files prevent the asp.net worker process from reading the files its the same as if they were missing.

2. The above issue seems most likely for this specific error but similar errors can occur if the search index is getting currupted. The search index can get corrupted if you have 2 physical sites using the same database and the same siteid. In this case editing content one site will update the search index for that site but the other site using the same database is now out of sync becuase it gets the same content from the db but its search index doesn't have the new content since it lives in the file system.

Item 2 indicates the kind of thing you may be doing different and not telling me, there may be others that I'm not thinking of so its important to tell me anything different or unusual about your setup or environment.

Hope it helps,

Joe

3/24/2008 6:35:21 AM
Gravatar
Total Posts 18439

Re: Server error when trying to save any text editor output

Hi,

Just an update, I've reviewed the code around where this stack trace is pointing and added some hopefully more robust error handling so that if a problem occurs it will not blow up the site but will log the error so that further trouble shooting about the search index can be done but use of the site is not interrupted.

I'll be packaging a new set of release files with this fix included later today and announcing it in the blog when they are ready for download.

Best,

Joe

3/24/2008 12:48:33 PM
Gravatar
Total Posts 18439

Re: Server error when trying to save any text editor output

mojoPortal 2.2.5.1 is now available. It includes better error handling around the use of search index builders.

Hopefully that will resolve the issues or at least prevent errors from interuption of using the site.

You may want to keep an eye on the log for signs of problems if you find that search doesn't work as expected.

Hope it helps,

Joe

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