Saving Posts Crashes Blog Engine.

Aug 30, 2010 at 4:44 PM

Hello all!

I am currently trying to figure out why my blog crashes after each post. I think it may have something to do with the code in my post view but am not entirely sure. I havn't made any code changes to that file. Below is the entire error. Thanks in advance for any help because this is driving me crazy.

 

Error Message Received after trying to save post.

 

This one's down to me! Please accept my apologies for this - I'll see to it that the developer responsible for this happening is given 20 lashes (but only after he or she has fixed this problem).
Error Details:

Url :


Raw Url : /post/Get-Geared-Up.aspx

Message : Exception of type 'System.Web.HttpUnhandledException' was thrown.

Source : System.Web

StackTrace : at System.Web.UI.Page.HandleError(Exception e)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

at System.Web.UI.Page.ProcessRequest()

at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)

at System.Web.UI.Page.ProcessRequest(HttpContext context)

at ASP.post_aspx.ProcessRequest(HttpContext context)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

TargetSite : Boolean HandleError(System.Exception)

Message : Object reference not set to an instance of an object.

Source : App_Web_84k8kko1

StackTrace : at ASP.themes_cash_back_blog_v3_postview_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)

at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

at System.Web.UI.Control.Render(HtmlTextWriter writer)

at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

at System.Web.UI.Control.Render(HtmlTextWriter writer)

at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

at System.Web.UI.Control.Render(HtmlTextWriter writer)

at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

at ASP.themes_cash_back_blog_v3_site_master.__Renderform(HtmlTextWriter __w, Control parameterContainer)

at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)

at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)

at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)

at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)

at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

at System.Web.UI.Control.Render(HtmlTextWriter writer)

at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

at System.Web.UI.Page.Render(HtmlTextWriter writer)

at BlogEngine.Core.Web.Controls.BlogBasePage.Render(HtmlTextWriter writer) in D:\Projects\Be-1610\BlogEngine\DotNetSlave.BusinessLogic\Web\Controls\BlogBasePage.cs:line 361

at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

TargetSite : Void __Render__control1(System.Web.UI.HtmlTextWriter, System.Web.UI.Control)

Aug 30, 2010 at 6:12 PM

Ok ive done some detective work and discovered that the stock indigo theme works just fine as do the few other themes ive downloaded. but when it comes to my themes non of them work anymore. some of the older themes which were working no longer do. and there has been no code change to these..has anyone else ran into this issue?

Aug 30, 2010 at 7:27 PM

I see this occasionally when I'm editing a post.  It seems like something doesn't quite render correctly.  Usually, hitting the "back" button, making sure the changes are still there, then clicking "Save Post" again seems to work.  However, I think that's related to the post edit page, not the theme.

As far as your theme, does it do things the same way the other themes do?  I'd do thinks like going through and checking all Post.* references, then see where you may be making assumptions about the presence of these properties.  In a theme I'm currently developing, I have Post.DateCreated.ToString(" tt").ToLower() - if Post.DateCreated was null* the "ToString()" method call would fail.  

* This is a relatively bad example, as DateTime is a struct, which cannot be null.  You would be more likely to see this on strings, where you might be trying to do a .Replace() or some such manipulation.

Aug 30, 2010 at 8:35 PM

OK i figured it out. within my post view i have it set to dynamically pull an image for the post author. there are about 3 authors to my blog all with their own image. i created a new post but accidentally posted it with the blog admin account, which doesnt have a image URL filled in under the account profile. That is where my "null" was coming from and blowing everything up.

Thank you so much for your help danielsummers!

Aug 30, 2010 at 9:05 PM

Glad to be able to help.  :)