Bug in Paging Calculation OR in Membership User Conversation API

Bug in Paging Calculation OR in Membership User Conversation API

This question is not answered

When I try to load conversations like so

CommunityServer.WebServices.Service svc = new Api.Service(SITEURL, APIUSER, APIKEY);
CommunityServer.WebServices.Membership.User user = svc.Membership.GetUser(APIUSER);
user.LoadAllConversations();
The resulting web request issued by the client library is
GET /api/membership.ashx/users/2100/conversations/?pageindex=0&pagesize=0 HTTP/1.1
Rest-User-Token: {ENCODED TOKEN}=
Host: localhost.
Connection: Close
The problem here is that the subsequent call to dbo.cs_Messaging_GetConversationIdsForParticipant carries @pageSize=0
to [dbo].[cs_system_CalculatePagingInformation] resulting in an error of
Msg 8134, Level 16, State 1, Procedure cs_system_CalculatePagingInformation, Line 19
Divide by zero error encountered.
Now, there are many possible fixes, but as far as I can tell, changing the line in cs_system_CalculatePagingInformation
from 
 @maxPageIndex = @maxValue / @pageSize
to 
 @maxPageIndex = @maxValue / COALESCE(NULLIF(@pageSize, 0), cast(0x7fffffff as int))
would fix the logic error in the paging calculation
My question is.... is there an existing patch for this bug?
If not, can I get an indication of intent? Particularly, was a pagesize of 0 in the paging calculation intended to mean "Give me everything"? Or is the bug in the client library in not correctly setting a pagesize or in cs_Messaging_GetConversationIdsForParticipant  for not setting a pagesize?
All Replies
  • Two questions:

    1) What version is your site running?

    2) What is the version string on the CommunityServer.WebServcies.dll your application is using?

  • About Telligent Evolution

    Your version: 5.0.40807.7666

    CommunityServer.WebServices.dll

    Assembly / File / Product version 5.0.40616.5248

  • Just to add some detail.  We are using the codebase delivered with Hotfix: 5.SP1-Diff.RH.5.0.40807.8081

  • Anything on this yet?