Comments Don't Show on Homepage

Comments Don't Show on Homepage

This question is answered

Community Server 2007 version 3.1.31113.47.  New blog posts, pictures, or forum posts will appear on the homepage but blog comments will not and I can't figure out why.  The following is code from my home.aspx page, which I know is being hit because I can change the page size to 10 posts and see the results immediately.

Any ideas on why comments aren't showing?  I upgraded CS from an earlier version which displayed comments fine.  Everything else works.

protected override void OnInit(EventArgs e)
    {
        List<IndexPost> recentPosts = CSCache.Get("HomePageSearch-" + CurrentCSContext.User.RoleKey) as List<IndexPost>;
        if (recentPosts == null)
        {
            SearchQuery query = new SearchQuery();
            query.StartDate = DateTime.Now.AddDays(-100);
            query.EndDate = DateTime.Now.AddDays(1);
            query.PageSize = 5;
                        query.ApplicationTypes = new ApplicationType[] { ApplicationType.Forum, ApplicationType.Weblog, ApplicationType.Gallery, ApplicationType.FileGallery };
            recentPosts = CSSearch.Search(query).Posts;
            CSCache.Insert("HomePageSearch-" + CurrentCSContext.User.RoleKey, recentPosts, CSCache.MinuteFactor * 5);
        }
        RecentPostList.DataSource = recentPosts;

        base.OnInit(e);
    }

Matt Williamson Bunker Hollow
Verified Answer
  • Comments are not indexed and thus will not be shown up on your homepage.  If you want to show comments on your homepage you will need to add custom code to get the comments.

    Whilst comments were indexed in some earlier versions of Community Server, this functionality was removed in later versions due to customer feedback.

All Replies
  • Comments are not indexed and thus will not be shown up on your homepage.  If you want to show comments on your homepage you will need to add custom code to get the comments.

    Whilst comments were indexed in some earlier versions of Community Server, this functionality was removed in later versions due to customer feedback.

  • Thank you!

    Matt Williamson Bunker Hollow