Description
Description
It seems that the Post Template block doesn't allow you to add any new blocks as Inner Blocks if there are no published posts currently on the site.
Today I created a clean install of WordPress, with the twenty twenty three theme to begin a new site today, cleared out the default plugins/themes, removed the Hello World post from the site, went to create my home.html blog template in the site editor and frustratingly couldn't add any new blocks to the Post Template block.
After an hour of frustration and trying to troubleshoot this, and after restoring and publishing the Hello World default post, I was able to add new blocks to the Post Template block.
Setting up the template shouldn't be dependant on anything. If there are no posts present on the site it can simply fall back to the No Results block, but the Post Template block shouldn't be blocked from setting up however I want in the meantime.
This behaviour was extremely confusing and time costly today trying to understand what was happening.
Step-by-step reproduction instructions
- Install WordPress using any theme
- Ensure the Hello World post is either set as a draft or deleted leaving no published posts
- Edit either the template in the site editor or any page
- Add the core query loop block (which adds the Post Template block)
- Try to add new blocks to any variation of the query loop block inside the Post Template block
It can't be done.
Screenshots, screen recording, code snippet
chrome-capture-2023-4-17.webm
Environment info
- WordPress 6.2 / WordPress 6.2.1
- Any 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