Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.41k stars 1.99k forks source link

[Bug]: opening post/page editor at Atomic fires 404 "intent" API requests #71055

Open simison opened 1 year ago

simison commented 1 year ago

Quick summary

I see we request for "intent" in couple places in the editor, added in PRs regarding Seller experience:

https://github.com/Automattic/wp-calypso/pull/61222 https://github.com/Automattic/wp-calypso/pull/61771

On my Atomic site these APIs (/wp-json/wpcom/v2/site-intent) are returning 404 not found.

Furthermore, we request the data twice, while we could request just once and add to data store, and use it from there?

Even furthermore, we request data even if site is old and we're not about to show these welcome/video modals anyway. We should request only if we're about to show them something, not on every editor load.

Steps to reproduce

  1. Have an Atomic site, open post/page editor
  2. Observe 404ing API requests in Networks tab

What you expected to happen

Requests to work, or no requests done.

What actually happened

404 requests

Browser

No response

Context

No response

Platform (Simple, Atomic, or both?)

Atomic

Other notes

No response

Reproducibility

Consistent

Severity

None

Available workarounds?

None

Workaround details

No response

daledupreez commented 1 year ago

I am going to ping some of the longer-term members of @Automattic/serenity, as this seems related to some work we did earlier this year.

mreishus commented 1 year ago

Good points re:

On atomic, the file responsible for fetching is: wp-content/plugins/full-site-editing/wpcom-block-editor-nux/dist/wpcom-block-editor-nux.min.js. It fetches due to calls from the SellerCelebrationModal and the VideoCelebrationModal.

sixhours commented 1 year ago
Screen Shot 2023-03-16 at 4 29 31 PM

Confirmed this is still happening.