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

 avatar
#1
Dave Burke
06.14.2007 @ 9:42 PM
blog bits The current build of Community Server is now 3.0.20611.960. Congratulations to the Core Development
 avatar
#2
Dave Burke's Community Server Bits
06.14.2007 @ 9:52 PM
Don't let those Community Server SP2 View Counts die on the digital vine. Keyvan with a speedy fix
 avatar
#3
Community Blogs
06.14.2007 @ 10:19 PM
blog bits The current build of Community Server is now 3.0.20611.960. Congratulations to the Core Development
 avatar
#4
Yoda's Blog
06.17.2007 @ 5:03 PM
But I'm still fighting with the blogs... Either I'm getting new hardware, splitting out the IIS
 avatar
#5
Susan
06.19.2007 @ 12:55 PM
Where exactly should that be added? I have a shared blog set and wasn't sure where that value needed to go?
admin avatar
#6
Keyvan Nayyeri
06.20.2007 @ 7:21 AM

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.

 avatar
#7
skylin.xin
06.28.2007 @ 8:22 PM
thanks; may be this issue is a careless omission of CS2007 SP2, that all CS2007 SP2 themes both havn't this property;
 avatar
#8
Rich Wallace
07.12.2007 @ 1:48 PM
Did some digging around last night to see if there were any other CS'ers who ran into an issue where
 avatar
#9
le_sloth
09.01.2007 @ 4:34 PM
excellent!! this has been bugging me for several weeks now and couldn't figure out what had gone wrong?! seems odd that this new element was left out of the default theme - it's there for all of the others! thanks :)
 avatar
#10
Ron Crumbaker
10.17.2007 @ 8:36 AM
WOW! Thank you for this fix. I've been trying to find the solution! Plus, this is my favorite theme so far for CS 2007.1 that I have found!
 avatar
#11
Chris Millensifer
11.29.2007 @ 7:38 AM
Double and triple checked this setting in our custom theme. It's there alrighty and the value for IncrementViewCount is indeed true yet the view counts never change and remain at ZERO. I have double and triple checked the jobs, they run just fine - no exceptions and the SQL completes just fine as well. I'm stumped

Leave a Comment