Article vote_count and vote_sum are not consistent when cursor pagination is used. | Community
Skip to main content

Article vote_count and vote_sum are not consistent when cursor pagination is used.

  • May 27, 2024
  • 2 replies
  • 0 views

Mykyta

Hello. 

 

I believe I found an issue with the API. I generated some votes for each of my article (help center API).

When I use regular pagination i.e. request articles via /api/v2/help_center/articles, it shows vote_sum and vote_count as expected (the same that is displayed on the UI). But when I run it with cursor based pagination e.g. /api/v2/help_center/articles?page[size]=100, it shows same articles but with vote_count and vote_sum equal to an old value (zero in my case). In other words, it does not depict vote changes for articles.

Is this a bug ? 

2 replies

Hi Mykyta,
 
I'd like to replicate this behavior in testing.  Can you confirm the steps taken?  Did you submit the article votes right before requesting the articles via API?  Or were these older votes that were missing from the cursor paginated response?

Mykyta
  • Author
  • May 30, 2024

Hello. 

Steps are:
1. Go to any article you have. Vote it up
2. Request article via cursor pagination and see that vote_count and vote_sum for that specific article has not been upgraded

Initially I waited few minutes. Then I had an assumption that it may be some sort of cache or anything. I tried again in few hours (maybe 10-12, maybe more), but still no success. Now, after few days have passed, articles have correct values.
How much time does it take to upgrade these values on your side? 

I see that this is probably not a bug, as I thought before, since it is upgraded eventually. I just did not expect that it takes so much time.