Skip to content

post-count endpoint returns incorrect count #49955

Open
@kriskarkoski

Description

In some cases the post-count API endpoint will return an incorrect count of posts for a site while the posts endpoint returns the correct number. This manifests by having the count next to a post status in Calypso at https://wordpress.com/posts displaying an incorrect number compare to the actual number of posts shown in WP Admin.

So far I have only seen this behavior on Atomic sites so I am wondering if the count is being pulled from the cache site and this is not being synced properly? We have tried manually syncing sites impacted by this with some change in the difference, but not resolving the issue fully.

Since we're already calling the posts endpoint on the same page and it is accurate I'm not sure if there's an opportunity to save an API call and use this count instead?

Context

p9F6qB-6tA-p2

Does this happen on simple or atomic sites or both?

Only Atomic so far

Level of impact (Does it block purchases? Does it affect more than just one site?)

Low - It only affects a handful of sites and the correct number can be viewed in WP Admin. It does not otherwise impact managing the posts and they all load from my experience.

Screenshot / Video: If applicable, add screenshots to help explain your problem.

post counts scrubbed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions