You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show Template with Template Parts, unable to select #76101
With an FSE template that is comprised of Template Parts, this leads to editing the Template Parts.
When trying to select any of the blocks within the Template Parts, including the Content block, the only block one can select is the Template Part, which leads to editing the template part, which is NOT what is wanted in this context.
Step-by-step reproduction instructions
Create a Single Posts template that is primarily composed of Template Parts, then go to edit a Post/Page with "Show Template" on.
I guess the fix is to use Patterns instead of Template Parts…?
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
Please confirm which theme type you used for testing.
This isn't something I can reproduce, it may have been fixed already or something else is happening. @dannyreaktiv would you be able to share a screen recording of the issue?
Just to clarify, it is true that template parts aren't editable when using 'Show template'. My understanding of of 'Show template' is that it only shows the template, it doesn't make it editable. The risk of making it editable is that users won't understand changes will apply to every single post that uses the template since they are still in the context of editing a single post.
It is possible to double click on the template or template part to make edits.
The part that I couldn't reproduce is being able to edit the post content, that works fine for me, even when post content is in a template part.
Here's a little video showing the issue on WP 6.9.1… the post Content block is in a Template Part. When "Show Template" is off, everything works as expected. When "Show Template" is turned on, I am not able to edit or interact with the post Content block. I can click on the Template Part and be taken to the Site Editor.
I completely agree that there is a risk of making the Template Part editable when Show Template is on. However, it would be nice for blocks that are using context like postId or postType to remain editable/usable without changing the Template Part.
The PR description does say "Set the editing mode of children of core/template-part blocks to disabled, so that you're forced to click Edit in the toolbar.", it looks like this would include post content blocks.
TemplateContentPanel: Don't show content blocks that are in a Query Loop is another PR that looks to have introduced an issue, the memoization of the getPostBlocksByName selector causes it not to recompute when controlled blocks (like template parts) update, so the selector doesn't return content blocks within template parts.
@dannyreaktiv Managed to find a way to fix this. The fix will be in Gutenberg 22.8 (which should be released on Weds 25th March) and also in the upcoming WordPress 7.0 release.
Activity
talldan commentedon Mar 4, 2026
This isn't something I can reproduce, it may have been fixed already or something else is happening. @dannyreaktiv would you be able to share a screen recording of the issue?
talldan commentedon Mar 4, 2026
Just to clarify, it is true that template parts aren't editable when using 'Show template'. My understanding of of 'Show template' is that it only shows the template, it doesn't make it editable. The risk of making it editable is that users won't understand changes will apply to every single post that uses the template since they are still in the context of editing a single post.
It is possible to double click on the template or template part to make edits.
The part that I couldn't reproduce is being able to edit the post content, that works fine for me, even when post content is in a template part.
dannyreaktiv commentedon Mar 5, 2026
@talldan Thanks for responding.
Here's a little video showing the issue on WP 6.9.1… the post Content block is in a Template Part. When "Show Template" is off, everything works as expected. When "Show Template" is turned on, I am not able to edit or interact with the post Content block. I can click on the Template Part and be taken to the Site Editor.
I completely agree that there is a risk of making the Template Part editable when Show Template is on. However, it would be nice for blocks that are using context like
postIdorpostTypeto remain editable/usable without changing the Template Part.Screen.Recording.2026-03-04.at.9.50.39.AM.mov
talldan commentedon Mar 6, 2026
Thanks, I can reproduce the issue now, not sure why I couldn't before.
Yep, I think you're right that post content should be editable in this situation. I'll look into a fix!
dannyreaktiv commentedon Mar 6, 2026
Thank you so much for taking the time to look into this.
talldan commentedon Mar 9, 2026
I think this has been broken for a while, possibly since Template Parts: allow selection in page content focus mode, so a little while now.
The PR description does say "Set the editing mode of children of core/template-part blocks to disabled, so that you're forced to click Edit in the toolbar.", it looks like this would include post content blocks.
TemplateContentPanel: Don't show content blocks that are in a Query Loop is another PR that looks to have introduced an issue, the memoization of the
getPostBlocksByNameselector causes it not to recompute when controlled blocks (like template parts) update, so the selector doesn't return content blocks within template parts.This is quite a complex bug with several layers 😅
talldan commentedon Mar 11, 2026
@dannyreaktiv Managed to find a way to fix this. The fix will be in Gutenberg 22.8 (which should be released on Weds 25th March) and also in the upcoming WordPress 7.0 release.
dannyreaktiv commentedon Mar 11, 2026
This is incredible. Thank you so much!