Fix - EditPostActivity - Update fetching for the block editor's settings logic #21016
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #21005
It appears the
/wp/v2/themes?status=active
endpoint is not returning any data for self-hosted sites, from my debugging the API call it's returning isSorry, you are not allowed to view the active theme
.This endpoint is available in WordPress core so there must be something wrong with the authentication of this call.
As a workaround, this PR disables calling the following endpoints within the editor:
wp-block-editor/v1/settings?context=mobile
/wp/v2/themes?status=active
The first one is only available for Dotcom or Jetpack-connected sites with the Gutenberg plugin activated.
If the first one is unavailable, it fetches the current active theme to get its colors. This one is currently failing and blocking the Editor's UI and functionality.
Disabling these calls for self-hosted sites won't affect the editor's functionality.
To Test:
Self-hosted site (without Jetpack and the Gutenberg plugin)
Self-hosted site (with Jetpack and the Gutenberg plugin)
Simple sites
Atomic sites
BugFixBeforeAndroid.mov
AfterFixAndroid.mov
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):