This issue tracks the investigations for the previously reported issue.
A recent change in Gutenberg caused the editor to make a GET API call to the /themes endpoint on start. This was causing a bug in the editor for sites without Jetpack and the Gutenberg plugin enabled, leading to crashes.
We decided to disable making /themes calls from Gutenberg until this issue is resolved. The problem seems to be related to how we handle these calls on the React Native side in executeWPAPIRequest.
Expected behavior
The editor should be able to make this call since it's a core endpoint.
Actual behavior
The editor is unable to successfully make a GET request to the themes endpoint when opened on sites without Jetpack or the Gutenberg plugin enabled.
It returns a 401 error with the message: Sorry, you are not allowed to view the active theme., then it tries to get a new nonce and call the endpoint again but it still fails.
Steps to reproduce the behavior
[!IMPORTANT]
Use a self-hosted site without Jetpack or the Gutenberg plugin enabled.
Open the editor
Once the editor attempts to fetch the themes endpoint it stops working, you can edit or add new content.
This issue tracks the investigations for the previously reported issue.
A recent change in Gutenberg caused the editor to make a GET API call to the
/themes
endpoint on start. This was causing a bug in the editor for sites without Jetpack and the Gutenberg plugin enabled, leading to crashes.We decided to disable making
/themes
calls from Gutenberg until this issue is resolved. The problem seems to be related to how we handle these calls on the React Native side in executeWPAPIRequest.Expected behavior
The editor should be able to make this call since it's a core endpoint.
Actual behavior
The editor is unable to successfully make a GET request to the
themes
endpoint when opened on sites without Jetpack or the Gutenberg plugin enabled.It returns a
401
error with the message:Sorry, you are not allowed to view the active theme.
, then it tries to get a new nonce and call the endpoint again but it still fails.Steps to reproduce the behavior
themes
endpoint it stops working, you can edit or add new content.Tested on Samsung Galaxy A23 5G, Android 14, JPAndroid / WPAndroid
25.1