Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jon Ryan 5 posts 74 karma points
    Mar 16, 2016 @ 08:54
    Jon Ryan
    0

    Tag filters don't initially work

    SmartListPosts.cshtml

    line 33 :

            colResults = colResults.Where(x => x.GetPropertyValue<String>("smartBlogTags").Split(',').Contains(Request.QueryString["tag"]));
    

    Causes a null reference error if no tags have been added to an articles.

    Changing to:

            colResults = colResults.Where(x => x.GetPropertyValue<String>("smartBlogTags") != null).Where(x => x.GetPropertyValue<String>("smartBlogTags").Split(',').Contains(Request.QueryString["tag"]));
    

    Appears to have resolved the issue

Please Sign in or register to post replies

Write your reply to:

Draft