Tuesday, 18 November 2008

Getting Mirrored Blog Items to show in a AggregatePostList control : Community Server 2.1 SP3

The control declaration:

<Blog:AggregatePostList
                runat="Server"
                PageSize="5"
                id="AggregatePostList1"
                IncludeAutodiscovery="true"
                IncludeCategories="true"
                ScorePosts="true"
                ApplicationKey="News"
                MirrorDisplayType="AllBlogs"
                EnablePaging="false"
                EnableTitle="false">
              <SkinTemplate>
                <h2 class="CommonTitle">
                  <asp:Literal runat="server" id="title" Visible="false" />
                  News
                </h2>
                <Blog:AggregateList id="Posts" runat="Server" EnableTitle="false"/>
              </SkinTemplate>
            </Blog:AggregatePostList>

NOTE: ApplicationKey needs to be set to the blog name.  Each mirrored blog needs the "Aggregate in site blog roll" checkbox checked so that it appears in the aggregate control, as above.  Changing this flag after the blogs have been mirrored will not make a difference, retrospectively.

To configure existent posts to appear in the Community Aggregate, just run

update cs_posts
set PostConfiguration = 55 where SectionID = XXXX

Where the section id is the id of the blog. Look in select * from cs_sections where name = 'blog name' for the section id.

Invoke the CS 2.1 RollerBlogUpdater manually

CommunityServer.RollerBlogs.Components.RollerBlogUpdater r = new CommunityServer.RollerBlogs.Components.RollerBlogUpdater();
        r.Execute(CommunityServer.Configuration.CSConfiguration.GetConfig().GetConfigSection("CommunityServer/Jobs").ChildNodes[17]);

Where 17 in the index of the job node in the Jobs section of CommunityServer.config

Community Server 2.1 SP3 : Blogs :: Mirrored Feeds

If mirrored feeds do not work correctly, it's because the "RollerBlogUpdater" job inside Community Server runs under the "Anonymous User" context.  Ensure the blog in question has VIEW permissions on the Everyone role (the Everyone role is the only role that the Anon user is associated with)