Skip to content

Handle missing discussion settings#25585

Open
crazytonyli wants to merge 3 commits into
trunkfrom
bugfix/post-discussion-toggles
Open

Handle missing discussion settings#25585
crazytonyli wants to merge 3 commits into
trunkfrom
bugfix/post-discussion-toggles

Conversation

@crazytonyli
Copy link
Copy Markdown
Contributor

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.commentsAllowed and pingbackInboundEnabled properties to an optional, where nil means 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.

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.
@crazytonyli crazytonyli added this to the 27.0 milestone May 26, 2026
@crazytonyli crazytonyli requested a review from jkmassel May 26, 2026 08:47
@dangermattic
Copy link
Copy Markdown
Collaborator

2 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number32343
VersionPR #25585
Bundle IDorg.wordpress.alpha
Commit8fe666e
Installation URL11p3gmlnsng2o
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number32343
VersionPR #25585
Bundle IDcom.jetpack.alpha
Commit8fe666e
Installation URL7cpm4a1a7v120
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants