Comment count for Blog Post not updated after moderation

When a comment has been flagged and denied through the moderation process for a blog post, I would expect the comment count to update.

To recreate this issue, please follow the following steps:
1. Login with valid credentials
2. Navigate to a blog
3. Post a comment on a blog- The comment count should update by 1
4. The comment should be flagged by another member
5. The comment count still displays 1 after being flagged
6. Navigate to Moderation and Deny the flag as an admin

The comment is not displayed but the comment count still displays 1 for the flagged comment.

Since the flag was not approved and the comment is not displayed, shouldn't the comment count update to 0?

This same question would also apply to Discussion Thread comments. 

Parents
  • Hi , I'm working on testing this scenario on my local Community site, running version 10.1.8.10498. Could you let me know what version you are testing on? You can find this under Administration > About.

    I ran two separate tests but I cannot create the same result that you are seeing. Here's what I did:

    Scenario #1

    1. Login as a non-admin, non-moderator user.
    2. Comment on a blog post.
    3. Login as a different non-admin, non-moderator user.
    4. Flag the comment from step 2 as abusive.
      1. Nothing happens other than a "Thank you for your report" message. Comment remains and the count is the same.
    5. Login as a third non-admin, non-moderator user.
    6. Flag the comment from step 2 as abusive.
      1. Again, nothing happens other than a "Thank you for your report" message. Comment count the same.
    7. Login as admin.
    8. Check the Moderation Queue for any reports. No reports found under any tab.

    Scenario #2

    1. Login as a non-admin, non-moderator user.
    2. Comment on a blog post.
    3. Login as an admin user.
    4. Flag the comment from step 2 as abusive.
      1. The comment count changes.
    5. Refreshing the page shows the comment is no longer on the page and the comment count is updated correctly.
    6. Check the Moderation Queue for any reports; see the comment that was reported there and already "Denied"

    So with Scenario 2, if the comment is reported as abusive AND denied, as is the case when reporting abusive content with an Administrator account, then the comment is removed from the blog post and the comment count is updated appropriately.

    As for Scenario 1, I'd suspect I'd need to create additional accounts to continue to flag the comment as abusive before it meets the threshold of "Enough people said this is abusive, so it's marked."

    Depending on the version you're testing on, this may differ depending on bug fixes. The version of Community I'm testing on was released in June, so it's fairly new.

  • Our app version is 10.1.8.10498

    Yes, the comment count is updated in the UI, but it seems inconsistent via the API. 

    Here are our steps when calling the API.

    1. GET /api.ashx/v2/blogs/4/posts/24.json

    Response snippet:

    "BlogPost":{  
          "ContentId":"8986e45e-a1db-4619-993b-352dd44fc388",
          "ContentTypeId":"f7d226ab-d59f-475c-9d22-4a79e3f0ec07",
          "CommentCount":21
          }

    GET /api.ashx/v2/comments.json?IncludeChildren=false&PageIndex=&PageSize=20&ContentId=8986e45e-a1db-4619-993b-352dd44fc388&ContentTypeId=f7d226ab-d59f-475c-9d22-4a79e3f0ec07&sortBy=MostRecent&sortOrder=Descending

    Response snippet:

       "TotalCount":14,
       "UserCanCreateComment":true,
       "Comments":[]

    (Comment data in array, but excluded for brevity)

    2. Have user A flag a comment for user B in this post as abusive

    3. As user B, who created the post, appeal the flag.

    4. As an admin/moderator, reject the appeal.

    5. GET /api.ashx/v2/blogs/4/posts/24.json

    Response snippet:

    "BlogPost":{  
          "ContentId":"8986e45e-a1db-4619-993b-352dd44fc388",
          "ContentTypeId":"f7d226ab-d59f-475c-9d22-4a79e3f0ec07",
          "CommentCount":21
          }

    (SAME AS BEFORE)

    GET /api.ashx/v2/comments.json?IncludeChildren=false&PageIndex=&PageSize=20&ContentId=8986e45e-a1db-4619-993b-352dd44fc388&ContentTypeId=f7d226ab-d59f-475c-9d22-4a79e3f0ec07&sortBy=MostRecent&sortOrder=Descending

    Response snippet:

       "TotalCount":13,
       "UserCanCreateComment":true,
       "Comments":[]

    (THIS COUNT NOW CHANGED)

    Why does the TotalCount change in the Get Comments endpoint, but not the CommentCount in the Get Blog Post endpoint?

Reply
  • Our app version is 10.1.8.10498

    Yes, the comment count is updated in the UI, but it seems inconsistent via the API. 

    Here are our steps when calling the API.

    1. GET /api.ashx/v2/blogs/4/posts/24.json

    Response snippet:

    "BlogPost":{  
          "ContentId":"8986e45e-a1db-4619-993b-352dd44fc388",
          "ContentTypeId":"f7d226ab-d59f-475c-9d22-4a79e3f0ec07",
          "CommentCount":21
          }

    GET /api.ashx/v2/comments.json?IncludeChildren=false&PageIndex=&PageSize=20&ContentId=8986e45e-a1db-4619-993b-352dd44fc388&ContentTypeId=f7d226ab-d59f-475c-9d22-4a79e3f0ec07&sortBy=MostRecent&sortOrder=Descending

    Response snippet:

       "TotalCount":14,
       "UserCanCreateComment":true,
       "Comments":[]

    (Comment data in array, but excluded for brevity)

    2. Have user A flag a comment for user B in this post as abusive

    3. As user B, who created the post, appeal the flag.

    4. As an admin/moderator, reject the appeal.

    5. GET /api.ashx/v2/blogs/4/posts/24.json

    Response snippet:

    "BlogPost":{  
          "ContentId":"8986e45e-a1db-4619-993b-352dd44fc388",
          "ContentTypeId":"f7d226ab-d59f-475c-9d22-4a79e3f0ec07",
          "CommentCount":21
          }

    (SAME AS BEFORE)

    GET /api.ashx/v2/comments.json?IncludeChildren=false&PageIndex=&PageSize=20&ContentId=8986e45e-a1db-4619-993b-352dd44fc388&ContentTypeId=f7d226ab-d59f-475c-9d22-4a79e3f0ec07&sortBy=MostRecent&sortOrder=Descending

    Response snippet:

       "TotalCount":13,
       "UserCanCreateComment":true,
       "Comments":[]

    (THIS COUNT NOW CHANGED)

    Why does the TotalCount change in the Get Comments endpoint, but not the CommentCount in the Get Blog Post endpoint?

Children
No Data