Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 800 forks source link

Jetpack Stats - 48 hour graph breaking in WP Admin on a site #39729

Open kimclowa8c opened 14 hours ago

kimclowa8c commented 14 hours ago

Impacted plugin

Jetpack

Quick summary

Hello! I'm going to work with screenshots as the site hasn't yet launched - I don't want the dev URL on a public repo. Feel free to find me in Slack for the URL (@kim in Automattic's Slack org)

The Jetpack Stats graph that shows results is showing a broken image. The issue was also present on kimclow.blog last week, however after reconnecting Jetpack that seemed to resolve the issue. We're unsure how to resolve it on this new site. The JP connection is active.

What's interesting is that if you view the site via Calypso, the graph works perfectly.

Image

If you view it via WP Admin, it's broken.

Image

Our devs took a quick look and said:

I figured out that the code not working is inside the function stats_reports_page in the Jetpack file modules/stats.php. By the looks of it, it might be a failed GET request to dashboard.wordpress.com/wp-includes/charts/admin-bar-hours-scale-2x.php but I’m not perfectly sure

Steps to reproduce

A clear and concise description of what you expected to happen.

I expected the 48-hour graph to display regardless of which version of the backend you're working on.

What actually happened

We get a broken image next to the Statistics link when viewing the site via WP-admin.

Impact

One

Available workarounds?

There is no user impact

If the above answer is "Yes...", outline the workaround.

No response

Platform (Simple and/or Atomic)

Atomic

Logs or notes

Please ping me directly for the site URL

katiebethbrown commented 12 hours ago

This is specific to Dotcom Atomic sites. The /wp-includes/charts/admin-bar-hours-scale-2x.php file doesn't exist in the symlinked includes on the Atomic platform. (The charts folder doesn't exist there either.)

That path does load for simple sites.

On my Jetpack connected Pressable site, the graph in the masterbar loads from a different path, which is what I would expect to happen on Atomic sites as well:

/wp-admin/admin.php?page=stats&noheader&proxy&chart=admin-bar-hours-scale-2x

kimclowa8c commented 9 hours ago

Adding this GH issue in case it's helpful: https://github.com/Automattic/wp-calypso/issues/49643