I installed Smart blog and it works fine until I create a post, publish, and preview. I get this error messages. I'm using version 2 with Umbraco version 7 working in visual studio 2010.
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:
Line 13: foreach (IPublishedContent post in posts)
Line 14: {
Line 15: foreach (string category in post.GetProperty("smartBlogCategory").Value.ToString().Split(','))
Line 16: {
Line 17: if (categoryList.ContainsKey(category))
Does this only happen when you preview the post? Or does it happen on live posts too? Alex is indeed correct, but I'd like to be able to reproduce the error so I can make a fix and release it.
When I created a post, the whole blog stopped working on the front end with the error message. When I delete the post, the front end works again (well, the search is giving an error too but that is a different thread). I'm not a developer so I'm not sure how I can check on null or fill the property :(
Error message when previewing a new post
Hello Luke,
I installed Smart blog and it works fine until I create a post, publish, and preview. I get this error messages. I'm using version 2 with Umbraco version 7 working in visual studio 2010.
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:
Line 13: foreach (IPublishedContent post in posts) Line 14: { Line 15: foreach (string category in post.GetProperty("smartBlogCategory").Value.ToString().Split(',')) Line 16: { Line 17: if (categoryList.ContainsKey(category))
Source File: c:\SRC\Konverge.WebSite.Umbraco\KonvergeUmbraco\Views\Partials\SmartListCategories.cshtml Line: 15
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009
Hi Christine,
You have null in this place : post.GetProperty("smartBlogCategory").Value.
Try to use check on null or fill this property.
Thanks, Alex
Hi Christine,
Does this only happen when you preview the post? Or does it happen on live posts too? Alex is indeed correct, but I'd like to be able to reproduce the error so I can make a fix and release it.
Thanks, Luke
Hi Luke,
When I created a post, the whole blog stopped working on the front end with the error message. When I delete the post, the front end works again (well, the search is giving an error too but that is a different thread). I'm not a developer so I'm not sure how I can check on null or fill the property :(
Thanks for your help!
Christine
Hi Christine,
I'll have a look at release a fix for you this afternoon. Will you be okay with re-installing the blog one the update has been released?
Thanks, Luke
Yes, that's no problem - thanks again!
Hi Christine.
Could you try this version please? http://our.umbraco.org/FileDownload?id=10820 It (should) fix your problem, please let me know if it doesn't.
Thanks, Luke
Hi Luke,
Thanks, not getting that error anymore :)
Christine
No problem, let me know if you need anything else.
is working on a reply...