Skip to content
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

Documentation: InnerBlocks Templates apply whenever InnerBlocks is empty, not just on Insert #64801

Closed
2 tasks done
SeanMcMillan opened this issue Aug 26, 2024 · 1 comment · Fixed by #66911
Closed
2 tasks done
Labels
[Type] Bug An existing feature does not function as intended

Comments

@SeanMcMillan
Copy link
Contributor

Description

https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/#template

The documentation says "Use the template property to define a set of blocks that prefill the InnerBlocks component when inserted." However, the template is prefilled whenever the innerBlocks are empty, not just when they are inserted.

#25050 Covers this and implies that it is intended behavior. That should be documented.

Step-by-step reproduction instructions

  1. Read the documentation
  2. Implement a custom block with a template for the expected default use case
  3. Add that block to a page
  4. Delete the innerblocks
  5. Save and reload the editor
  6. Become confused

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.6

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
@SeanMcMillan SeanMcMillan added the [Type] Bug An existing feature does not function as intended label Aug 26, 2024
sarthaknagoshe2002 added a commit to sarthaknagoshe2002/gutenberg that referenced this issue Nov 11, 2024
adamsilverstein pushed a commit that referenced this issue Dec 16, 2024
peterwilsoncc pushed a commit to peterwilsoncc/gutenberg-build that referenced this issue Dec 16, 2024
yogeshbhutkar pushed a commit to yogeshbhutkar/gutenberg that referenced this issue Dec 18, 2024
yogeshbhutkar pushed a commit to yogeshbhutkar/gutenberg that referenced this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
3 participants
@SeanMcMillan and others