-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't swap templates in the post editor #61031
Comments
cc @ntsekouras as I believed you worked on some of this (well me as well :P) |
@youknowriad, can you reproduce the issue? In that case, would you mind adding the reproduction steps? The obvious guess is that the |
I can't really reproduce actually :) I'll ask more information about it. |
I think I know where regression is coming from. The old component was merging values from REST API and editor settings Unfortunately, this behavior also covered a bug for the block themes, where querying the templates endpoint by Why are the REST API and
|
@oandregal, I tracked down this regression to this performance ticket - https://core.trac.wordpress.org/ticket/57756. The problem with 55687 changeset:
|
A fix is ready for testing #61244. I would like to add PHPUnit tests before landing them in the core, but I still haven't figured out the best way. |
Based on the test instructions provided by @mike-henderson I'm unconvinced this needed any fixing, and #61244 introduces a performance regression (timeToFirstByte, front-end). I've shared what I know at #61244 (comment) to gather feedback. The TLDR is: how custom templates are registered by block themes? Via |
Description
Possible the same as https://core.trac.wordpress.org/ticket/60997
Potentially related to #60946
In a block theme, by default, The Template setting in the Post/Page panel only has Edit template, Create new template, and Template preview. I can see the custom templates registered in the site editor under the Custom section of Templates. The "Swap Template" menu item is not visible when you have custom templates.
Apparently adding the
customTemplate
setting totheme.json
shows the templates there.It seems that it used to be visible in previous version of WordPress.
Step-by-step reproduction instructions
Just open the post editor for a block theme where you created or has custom templates.
Screenshots, screen recording, code snippet
No response
Environment info
No response
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
The text was updated successfully, but these errors were encountered: