Community Server 2007 Service Pack 2 and Views Count
After upgrading my site to Community Server 2007 Service Pack 2, I noticed a problem in my views counter in blog Control Panel: all my views counters stopped and Community Server didn't increment statistics after upgrade.
The first step was to check everything and make sure I haven't missed any upgrade step, jobs are running, my site has a correct structure and there is no exception logged in database about this issue. And nope, they were not the reason. After asking on private alias and Community Server forums, I got no response and finally decided to stick with it to solve the problem myself.
As I didn't see any similar issue on Community Server forums, I thought this may be a result of my custom blog theme so tried to see what's new in blog themes which can cause my problem. After comparing Chameleon controls, I belief that there is a new addition to WeblogPostData control: IncrementViewCount property.
This property is set to false by default and this will stop the views counter from incrementing values so it's necessary to set this property to true in order to have a correct views counter value.
So here is the element that should be placed inside the page where you want to display the post body:
<CSBlog:WeblogPostData ID="WeblogPostData3" runat="server" Property="FormattedBody" IncrementViewCount="true">
This was listed as a feature enhancement in announcement post for Service Pack 2. Using this new property, views counter won't be updated for truncated posts (for example, what you see in my blog homepage for post bodies) and helps to have real statistics for each post.
[advertisement] Axosoft OnTime 2008 is four developer tools in one: bug tracking, project wiki, feature management, and help desk. It manages your development process so developers can focus on coding. Installed or Hosted – Free Single-user license -- Free 30-day team trial.
11 Comments : 06.14.07
Feedbacks
Susan,
You have to search for all <CSBlog:WeblogPostData /> elements and add that new IncrementViewCount attribute to all elements that should be considered in statistics.

#1
Dave Burke
06.14.2007 @ 9:42 PM