.editor-styles-wrapper .has-global-padding not working when using post-content block in template part
Description
Hi.
As the title says, the left/right padding in the editor is not applied when using a post-content block with a template part.
When template parts are not used, the left/right padding is applied.
How can I apply the left/right padding even when using a template part?
Best regards.
Step-by-step reproduction instructions
- Create template "/templates/singular.html"(code snippet)
- Create a template part "/parts/main-singular.html"(code snippet)
Screenshots, screen recording, code snippet
Work
/templates/singular.html
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:post-content {"layout":{"type":"constrained"}} /-->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->

Not work
/templates/singular.html
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:template-part {"slug":"main-singular","tagName":"main"} /-->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
/parts/main-singular.html
<!-- wp:post-content {"layout":{"type":"constrained"}} /-->

Environment info
- WP 6.1
- Twenty Twenty-Three 1.0 and other theme.
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
Hi @s56bouya, thanks for reporting. I just tested with the latest version of Gutenberg (15.1) and the Twenty Twenty-Three theme, and I am not able to replicate this issue. I also tested with WordPress 6.2 Beta 2 and everything worked as expected.
Would you be able to retest with either Gutenberg or Beta 2 and see if the issue is resolved on your end? Thanks!
Hi @s56bouya, this issue came up again in today's Editor Bug Scrub. Have you had a chance to test with the latest version of Gutenberg or WordPress 6.2 Beta 3? I am still no able to replicate on my end.
HI @ndiego ,Sorry for the late response. I tried with wp 6.2 beta-3 and was able to reproduced.
When reproducing with Twenty Twenty Thirteen, I was missing the steps to delete or rename single.html and page.html and not load the templates, but only the singular.html template.
Is it possible to check reproduction again?
Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.
I'm having the same problem. If I don't put "wp:post-content" directly in the single.html file in templates, but through a template part, has-global-padding is not added to the div of .is-root-container only in the block editor. It is added to the front and site editors. Not fixed in Gutenberg 15.9.1
Hmm, it shouldn't be too hard to reproduce.Reproduction is not difficult.
Thanks for the feedback @iidastudio and @s56bouya. We will review in tomorrow's Editor Bug Scrub, and see what we can do to move this issue towards a resolution.
Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.
Reproduction Report
Description
❌ This report can't validate the issue reproduction
Environment
- WordPress: 6.9-alpha-60459
- PHP: 8.2.29
- Server: Apache/2.4.62 (Debian)
- Database: mysqli (Server: 11.8.2-MariaDB-ubu2404 / Client: mysqlnd 8.2.29)
- Browser: Chrome 138.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Three 1.6
- MU Plugins: None activated
- Plugins:
- Gutenberg 21.2.0
- Test Reports 1.2.0
Testing Instructions
- I've followed OP instructions and the ones provided here
- ❌ Paddings are displayed as expected
Actual Results
- ❌ Error condition is not occurring
Additional Notes
- It seems that this issue has been stalling for so long because it's not reproducible. Maybe it has been solved already in certain patch. I would advise in this case to close as
worksformeand in case any of the authors happen to find a clear method to reproduce this, then I would suggest commenting here and pinging me for further testing. Needs Testingcan be removed also
cc @karmatosed
Supplemental Artifacts
Through a template part:

Directly
