-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Feature] Templates APIRelated to API powering block template functionality in the Site EditorRelated to API powering block template functionality in the Site Editor[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
Since #66579, the Site Editor has changed which template it uses.
In current trunk, the Site Editor uses the template from /wp/v2/templates/lookup&slug=front-page&_locale=user
.
In Gutenberg 19.5.1, the Site Editor uses the template from /wp/v2/templates/lookup&slug=page-{$page_slug}&_locale=user
.
Depending on the theme, the templates returned by those two requests can be very different.
Step-by-step reproduction instructions
- Create a page.
- Set that page to be your site's homepage (
page_on_front
). - Switch theme to Twenty Twenty-Four.
- Go to
wp-admin/site-editor.php?canvas=edit
- In Gutenberg 19.5.1, you'll see the title and contents of the page you created in step 1. In the Page settings sidebar, note that it's using the "Pages" template (or whatever template you gave it.)
- In current trunk, you'll see the Twentytwenty-Four default homepage. In the Page settings sidebar, note that it's using the "Blog Home" template.
Screenshots, screen recording, code snippet
19.5.1 | Trunk |
---|---|
Environment info
WordPress: 6.8-alpha-59335
Gutenberg: 49c3bf9 (behavior changed in #66579)
Theme: Twenty Twenty-Four
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Metadata
Metadata
Assignees
Labels
[Feature] Templates APIRelated to API powering block template functionality in the Site EditorRelated to API powering block template functionality in the Site Editor[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended