This project is read-only.

BlogEngine 1.6.1 - Error in Comments Setting Page

Apr 29, 2010 at 1:19 AM
Edited Apr 29, 2010 at 1:19 AM

I just upgraded from 1.5 to 1.6.1.  Everything works so far with the exception of comment configuration.  I'm having an issue similar to this thread: .  If I turn off custom errors, I can see this:

 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 78:     protected void BindFilters()
Line 79:     {
Line 80:         gridFilters.DataKeyNames = new string[] { _filters.KeyField };
Line 81:         gridFilters.DataSource = _filters.GetDataTable();
Line 82:         gridFilters.DataBind();

Source File: d:\hosting\2560816\html\admin\Comments\Settings.aspx.cs    Line: 80

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   admin_Comments_Settings.BindFilters() in d:\hosting\2560816\html\admin\Comments\Settings.aspx.cs:80
   admin_Comments_Settings.Page_Load(Object sender, EventArgs e) in d:\hosting\2560816\html\admin\Comments\Settings.aspx.cs:32
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

Server Error in '/' Application.

Object reference not set to an instance of an object.


I've checked permissions on App_Data, and they are set to Read/Write.  If I comment out the calls to BindFilters() and BindCustomFilters() in /comments/settings.aspx.cs, I can view the comment settings, but of course I cannot manage filters.

Any suggestions?

Apr 29, 2010 at 6:51 AM

If you're using XML storage (the default), I would check in the App_Data\datastore\extensions folder.  There should be a file there named MetaExtension.xml.  This gets created when BE loads if it does not already exist.  Do you have that file in there?

Apr 29, 2010 at 5:29 PM

I'm using MSSQL for storage.  I did notice in the be_DatastoreSettings table, there is an entry for MetaExtension.  Anything I should look at there?

Apr 30, 2010 at 1:04 PM

Ok.  If the MetaExtension is in the be_DataStoreSettings table, then it's probably good.  In my MetaExtensions.xml file, it contains items such as "BeCommentFilters" and "BeCustomFilters".  You could check and see if those values appear somewhere within the MetaExtension value in the DB.

Are you using the global.asax file that comes with BE?  In there, it loads the extensions like:

void Application_Start(object sender, EventArgs e)

Do you have Extensions in your BE installation?  If you go to the Extensions tab in the control panel, do any appear there?

Of course I'm not seeing this error you're getting :)  But I was just stepping thru the code to see how objects and data get populated.  These are the potential problem areas that have come to mind thus far.

Apr 30, 2010 at 7:18 PM

Thanks BenAmada for your help.  This is now resolved.  What I did was copy the contents of MetaExtensions.xml to the be_DatastoreSettings table.