Fixes fetching terms on XML-RPC disabled sites#25767
Open
crazytonyli wants to merge 3 commits into
Open
Conversation
Self-hosted taxonomy went through XML-RPC term methods, which some hosts block at the WAF, breaking tags and categories on new posts (#25758). Prefer the core REST API (wp/v2) whenever the site has application-password access, keeping XML-RPC only as a fallback for legacy sites without it.
The two convenience initializers were ambiguous about when to use each. Introduce tags(for:) and taxonomy(_:client:) so call sites read by intent, and drop the unused blog parameter that was threaded through the custom taxonomy path.
Collaborator
Generated by 🚫 Danger |
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33092 | |
| Version | PR #25767 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | bfdb97a | |
| Installation URL | 3rf22jb7vfnqg |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33092 | |
| Version | PR #25767 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | bfdb97a | |
| Installation URL | 4kcd2fsftjkao |
crazytonyli
commented
Jul 9, 2026
| TaxonomyServiceRemoteCoreREST *coreREST = [[TaxonomyServiceRemoteCoreREST alloc] initWithBlog:blog]; | ||
| if (coreREST) { | ||
| return coreREST; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Just a reminder to myself: we need to make sure categories can be fully fetched, especially on atomic sites(I think?).
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
I recommend reviewing this PR commit by commit: the first commit is the fix, the second is a
TagsViewModelconstruction cleanup.Description
Fixes #25758.
I thought the tags (and custom terms) selection screen uses core REST API when available. But that is not the case. My misunderstanding probably comes from the TagsViewModel initialisers being a bit messy. The tags selection type names need a bit more cleanup, due to how it's expanded from tags-only to all terms.
The second commit cleans up the area a little bit. But there are more can be done.
Testing instructions
Disable XML-RPC on a self-hosted site, open a new post's Post Settings and confirm Categories and Tags load, can be selected, and new ones can be created.