Template activation: revert to old endpoint for post template picker#72661
Template activation: revert to old endpoint for post template picker#72661
Conversation
|
Size Change: -130 B (-0.01%) Total Size: 2.27 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 30b8aa0. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18778091525
|
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
I just cherry-picked this PR to the wp/6.9 branch to get it included in the next release: e203469 |
What?
Closes #72586.
Why?
The template property on post objects only receives template slugs, not IDs. This means you cannot just pick any template from the database: you can only pick the active template for a slug, or custom templates, which is basically what the "old" endpoint queries.
How?
For now let's keep the querying the "old" endpoint in place until we refactor this to use IDs. This also allows us to do some backwards compatibility testing and have less surface area of the new feature exposed.
Testing Instructions
Pick templates through the post or page editor (through the modal). There's some e2e tests for this.
Testing Instructions for Keyboard
Screenshots or screencast