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.58k stars 799 forks source link

Intermittent: Theme not set properly after shifting site to Atomic #34862

Open Imran92 opened 8 months ago

Imran92 commented 8 months ago

Impacted plugin

mu wpcom

Quick summary

We faced this issue while working on this PR - https://github.com/Automattic/wp-calypso/pull/85829. The main issue for this PR is here - https://github.com/Automattic/wp-calypso/issues/85107.

During Sensei's onboarding, we create a simple wpcom site here https://github.com/Automattic/wp-calypso/blob/bac20e6f22f761b13b54ecae6aead680581fd883/packages/data-stores/src/onboard/actions.ts#L146. Later, it's transferred to be a jetpack site and other plugins like Sensei is installed.

The issue is, after installation is completed, hitting this API returns null -

https://public-api.wordpress.com/wp/v2/sites/<site-id>/themes?status=active.

It gets fixed once we go to Appearance and switch a Theme. It's not reproducible later.

It's very intermittent as well. It happened for two of us, and for another two, it didn't happen. It happened to me every time during issue testing and investigation, but later, after fixing it, I couldn't reproduce it reliably. So it can also be user-specific.

Steps to reproduce

  1. Checkout a commit prior to https://github.com/Automattic/wp-calypso/pull/85829.
  2. Go to http://calypso.localhost:3000/setup/sensei
  3. Complete the steps
  4. Now find the blog's id and send an API request to https://public-api.wordpress.com/wp/v2/sites/<site-id>/themes?status=active

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

The API to return the current active theme (Course)

What actually happened

Returned null

Impact

One

Available workarounds?

There is no user impact

Platform (Simple and/or Atomic)

Atomic

Logs or notes

It is intermittent, so probably trying different ways may help reproduce it. Like being proxied, using different users, both existing and new, different browsers etc.

I'm not sure if the selected "Impacted plugin" field is correct. But I'm not sure what is causing it. We can switch it later if we find the root cause.

liviopv commented 7 months ago

📌 FINDINGS/SCREENSHOTS/VIDEO Marking as Triaged since it requires dev environment to test

📌 ACTIONS

📌 Message to Author @Imran92 does this happen outside of the Sensei tailored flow? The only other similar issue I've seen is https://github.com/Automattic/wp-calypso/issues/86122 where Global Styles (not the whole theme) doesn't get applied when the Site goes Atomic.

liviopv commented 7 months ago

cc @Automattic/t-rex in case this relevant to you.

github-actions[bot] commented 1 month ago

This issue has been marked as stale. This happened because:

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.