I'm running uBlogsy 3.0.1 in umbraco 6.1.6. all had been going swimmingly until yesterday, when I started getting multiple NullReferenceException errors. On the landing page for the blog, the error is
Source Error:
Line 46:
Line 47: // show each post
Line 48: foreach (var n in posts)
Line 49: {
Line 50: @Html.Partial("uBlogsy/Landing/uBlogsyLandingShowPost", new ViewDataDictionary(ViewData) { { "Node", n }, { "GravatarSize", 40 }, { "ImageWidth", 300 }, { "ImageHeight", -1 } })
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 18: var month = Request.QueryString["month"];
Line 19: var day = Request.QueryString["day"];
Line 20: var prev = PostService.Instance.GetNextPost(Model.Content, tag, label, author, searchTerm, commenter, year, month, day);
Line 21: var next = PostService.Instance.GetPreviousPost(Model.Content, tag, label, author, searchTerm, commenter, year, month, day);
Line 22: }
ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 42] An unhandled exception occurred
System.NullReferenceException: Object reference not set to an instance of an object.
in Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.<get_GetXmlDelegate>b__2(UmbracoContext context, Boolean preview)
in Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.GetById(UmbracoContext umbracoContext, Boolean preview, Int32 nodeId)
in Umbraco.Web.PublishedCache.ContextualPublishedCache`1.GetById(Boolean preview, Int32 contentId)
in Umbraco.Web.UmbracoHelper.TypedDocumentById(Int32 id, ContextualPublishedCache cache)
in uHelpsy.Helpers.IPublishedContentHelper.GetNode(Int32 nodeId) in d:\_PROJECTS\Personal\uHelpsy - Library\uHelpsy\Source\uHelpsy.Web\Helpers\IPublishedContentHelper.cs:riga 24
in uHelpsy.Extensions.ExamineSerchResultExtensions.ToIPublishedContent(SearchResult result) in d:\_PROJECTS\Personal\uHelpsy - Library\uHelpsy\Source\uHelpsy.Web\Extensions\ExamineSearchResultExtensions.cs:riga 23
NullReferenceException on multiple pages
I'm running uBlogsy 3.0.1 in umbraco 6.1.6. all had been going swimmingly until yesterday, when I started getting multiple NullReferenceException errors. On the landing page for the blog, the error is
Source Error:
Line 46: Line 47: // show each post Line 48: foreach (var n in posts) Line 49: { Line 50: @Html.Partial("uBlogsy/Landing/uBlogsyLandingShowPost", new ViewDataDictionary(ViewData) { { "Node", n }, { "GravatarSize", 40 }, { "ImageWidth", 300 }, { "ImageHeight", -1 } })
Source File: c:\inetpub\etc-umb-616\Views\Partials\uBlogsy\Landing\uBlogsyLandingListPosts.cshtml Line: 48
On blog post pages, the error is:
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 18: var month = Request.QueryString["month"]; Line 19: var day = Request.QueryString["day"]; Line 20: var prev = PostService.Instance.GetNextPost(Model.Content, tag, label, author, searchTerm, commenter, year, month, day); Line 21: var next = PostService.Instance.GetPreviousPost(Model.Content, tag, label, author, searchTerm, commenter, year, month, day); Line 22: }
Source File: c:\inetpub\etc-umb-616\Views\uBlogsyPost.cshtml Line: 20
The only change that I can see is that someone added a new blog post (the second in the new year, if that matters).
I had the same problem and it seems to originate with the PostService not being available.
I restarted the website (by editing the web.config file). It doesn't answer why the problem occured but it made it go away, at least for now.
Edit: It came back the next day so this is not a fix.
I've the same problem!!!!!! How solve!!!! Where is the author?
I tried to edit web.config and site start working again!!! But how solve this?????? Which is the problem????
No crash again:
ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 42] An unhandled exception occurred
System.NullReferenceException: Object reference not set to an instance of an object.
in Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.<get_GetXmlDelegate>b__2(UmbracoContext context, Boolean preview)
in Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.GetById(UmbracoContext umbracoContext, Boolean preview, Int32 nodeId)
in Umbraco.Web.PublishedCache.ContextualPublishedCache`1.GetById(Boolean preview, Int32 contentId)
in Umbraco.Web.UmbracoHelper.TypedDocumentById(Int32 id, ContextualPublishedCache cache)
in uHelpsy.Helpers.IPublishedContentHelper.GetNode(Int32 nodeId) in d:\_PROJECTS\Personal\uHelpsy - Library\uHelpsy\Source\uHelpsy.Web\Helpers\IPublishedContentHelper.cs:riga 24
in uHelpsy.Extensions.ExamineSerchResultExtensions.ToIPublishedContent(SearchResult result) in d:\_PROJECTS\Personal\uHelpsy - Library\uHelpsy\Source\uHelpsy.Web\Extensions\ExamineSearchResultExtensions.cs:riga 23
in uBlogsy.BusinessLogic.PostService.GetNextPost(IPublishedContent current, String tag, String label, String author, String searchTerm, String commenter, String year, String month, String day) in d:\_PROJECTS\Personal\uBlogsy\uBlogsy MVC\Source\uBlogsy.BusinessLogic\PostService.cs:riga 231
in ASP._Page_Views_uBlogsyPost_cshtml.Execute()
Try to remove umbraco.config and all index files under TEMP\Examine\<folders>
is working on a reply...