Handle missing discussion settings#25585
Open
crazytonyli wants to merge 3 commits into
Open
Conversation
Model comment and pingback toggles as optional so an unset value is distinct from off. New posts seed these from the site's discussion defaults when known, the toggle is hidden when unknown, and the value round-trips through create/update without forcing a default.
Centralize remote settings fetch and persistence in a Swift coordinator that selects its source by precedence (WP.com REST, else Core REST with an XML-RPC complement, else XML-RPC) and writes once over the cache. Both full-metadata and settings-only syncs route through it instead of each duplicating transport-specific fetches.
Collaborator
Generated by 🚫 Danger |
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 32343 | |
| Version | PR #25585 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 8fe666e | |
| Installation URL | 11p3gmlnsng2o |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 32343 | |
| Version | PR #25585 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 8fe666e | |
| Installation URL | 7cpm4a1a7v120 |
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.


Note
Recommend reviewing by commits.
Description
Fix https://linear.app/a8c/issue/CMM-2076 and https://linear.app/a8c/issue/CMM-2077
The first commit is code format changes and can be ignored.
The second commit fixes the two issues, by allowing the
BlogSettings.commentsAllowedandpingbackInboundEnabledproperties to an optional, wherenilmeans the app is unable to fetch the discussion settings.The third commit fixes an "fetch site settings" issue discovered during development, where XMLRPC response may overwrite the core REST API response.
Testing instructions
Following the steps in the Linear issues to verify they are fixed.