Hi, I'm using SmartBlog 2.2.1 on Umbraco 7.4.2 and if any of the articles don't have tags, then when i click on the tag link on the side menu I get the error below. If I add tags to all articles then there is no error.
Is there anyway to prevent the error if not all pages have tags? I tried this on a fresh install of Umbraco with nothing else on it, as well as the site I'm currently building, and got the same error.
Thanks
Object reference not set to an instance of an object.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 31:
if (!String.IsNullOrEmpty(Request.QueryString["tag"]))
{
colResults = colResults.Where(x => x.GetPropertyValue
Error if tags are empty
Hi, I'm using SmartBlog 2.2.1 on Umbraco 7.4.2 and if any of the articles don't have tags, then when i click on the tag link on the side menu I get the error below. If I add tags to all articles then there is no error.
Is there anyway to prevent the error if not all pages have tags? I tried this on a fresh install of Umbraco with nothing else on it, as well as the site I'm currently building, and got the same error.
Thanks
Object reference not set to an instance of an object.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 31:
if (!String.IsNullOrEmpty(Request.QueryString["tag"])) { colResults = colResults.Where(x => x.GetPropertyValue
Hi Johanna,
Try to rewrite your code snippet:
Please add checking for null on x.GetPropertyValue("smartBlogTags")
Cheers, Alex
is working on a reply...