Wp-calypso: Page count incorrectly shows as zero on Atomic & Jetpack sites

Created on 24 Nov 2020  路  9Comments  路  Source: Automattic/wp-calypso

Wasn't quite sure if this should go in the Calypso or Jetpack repository, please feel free to move it if needed!

Replicated on WordPress.com Atomic and a self-hosted Jurassic Ninja site, appears to be happening on both existing and new sites.

## Steps to reproduce the issue

  1. Create a new site or check an existing site
  2. Go to Site > Pages
  3. The list of pages loads successfully, but the count shows as 0: https://d.pr/i/WSECOj

Typical troubleshooting steps (disconnecting/reconnecting Jetpack, running a full sync, running the post validator in the debugger, etc.) do not resolve the issue.

Pages [Type] Bug

Most helpful comment

Does this need to be moved to the JP repo?

This appears to be a Calypso issue. The WordPress.com REST API (used by WordPress.com simple sites directly, and via Jetpack by Atomic sites) returns the right number of posts and pages, but for some reason the Calypso view does not pick this up anymore:

image

All 9 comments

Also discussed in p9F6qB-6c3-p2

Ah, just saw you noted you reproduced it on a non-WPCOM site. Likely JP then but I'll check a few things.

@jeherve Does this need to be moved to the JP repo?

Does this need to be moved to the JP repo?

This appears to be a Calypso issue. The WordPress.com REST API (used by WordPress.com simple sites directly, and via Jetpack by Atomic sites) returns the right number of posts and pages, but for some reason the Calypso view does not pick this up anymore:

image

Hmm...I don't repro on my simple site.

Hmm...I don't repro on my simple site.

In my testing, I was not able to reproduce on simple either. It does appear to be impacting every Jetpack and Atomic site at the moment, however.

Looks like there was some recent work done around moving the pages navigation to the new PostTypeFilter component, which I suspect is where the pages query is failing or not being represented correctly?

cc @michaeldcain may have a good chance to know where to start https://github.com/Automattic/wp-calypso/commit/c08e8cf00d50db34b10d8b323405cbf3a998f29d

It looks like the count just didn't exist for pages before my change:

Screen Shot 2020-11-24 at 8 07 44 PM

I'll pull together a patch to fix it.

47724 returns the previous behavior of hiding the count for non-post views on Jetpack sites.

Was this page helpful?
0 / 5 - 0 ratings