fix: skip editor settings fetch when theme styles are disabled#353
Merged
fix: skip editor settings fetch when theme styles are disabled#353
Conversation
The guard in `fetchEditorSettings()` previously required both `shouldUsePlugins` and `shouldUseThemeStyles` to be false before skipping the fetch. This caused a 404 when a site supported plugins but not the `/wp-block-editor/v1/settings` endpoint. The editor settings endpoint is only relevant for theme styles, so the guard now checks `shouldUseThemeStyles` alone.
jkmassel
approved these changes
Mar 5, 2026
Contributor
jkmassel
left a comment
There was a problem hiding this comment.
With these changes, I was able to load the site that was erroring before the changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What?
Skip the
/wp-block-editor/v1/settingsfetch whenshouldUseThemeStylesis disabled, regardless of theshouldUsePluginsflag.Why?
Fix CMM-1921. Fix CMM-1163.
The guard in
fetchEditorSettings()previously required bothshouldUsePluginsandshouldUseThemeStylesto befalsebefore skipping the fetch. This meant a site with plugins enabled but no support for the block editor settings endpoint would still attempt the fetch, resulting in a 404 error that could cause the editor to fail to load.The editor settings endpoint is only relevant for theme styles — plugins have their own separate asset endpoint (
/wpcom/v2/editor-assets).How?
Changed the guard condition in
fetchEditorSettings()from:to:
Applied to both iOS (
RESTAPIRepository.swift) and Android (RESTAPIRepository.kt), with updated and additional test coverage on both platforms.Testing Instructions
/wpcom/v2/editor-assetsroute exists) but does not support the block editor settings endpoint (/wp-block-editor/v1/settingsroute is absent).Accessibility Testing Instructions
N/A — no UI changes.
Screenshots or screencast
N/A — no UI changes.