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 798 forks source link

My Jetpack : 404/400 requests to json api when Jetpack is disconnected. #37935

Closed mdbitz closed 1 month ago

mdbitz commented 4 months ago

Impacted plugin

Jetpack

Quick summary

When Jetpack is activated but not connected the My Jetpack page is making unnecessary API calls repeatedly.

If no connection exists there should not be any api requests to load data. In addition the code needs to be hardened so that it recognizes 400 and 404 responses and does not attempt to retry the requests.

Steps to reproduce

  1. Install and Activate jetpack
  2. Visit the wp-admin
  3. open Dev Tools to the "network" tab
  4. Visit My Jetpack

image

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

When Jetpack is activated but not connected we should not be making these api requests. At a minimum we should only be making them once.

What actually happened

4 requests are triggered that return 404/400 responses. These requests are retried twice for a total of 12 requests.

Impact

All

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Atomic, Self-hosted

Logs or notes

No response

obenland commented 1 month ago

@BogdanUngureanu Are you still working on this?

BogdanUngureanu commented 1 month ago

@obenland I forgot to remove myself from the assignees, sorry!

rcrdortiz commented 1 month ago

Shipped a fix for this issue.