Template part block doesn't handle a missing template part entity #36510
Labels
[Block] Template Part
Affects the Template Parts Block
Needs Design Feedback
Needs general design feedback.
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
When a template part block's associated template part entity/post is missing, the block is designed to show a warning to the user:
gutenberg/packages/block-library/src/template-part/edit/index.js
Lines 120 to 139 in 39f883e
Unfortunately this is never shown since the code that determines
isMissing
doesn't work. It uses the value fromgetEditedEntityRecord
which always returns a (truthy) object when resolved.I'm also unsure about this comment next to that code
This might be outdated as I can't see any evidence that this happens.
To solve this, some design guidance will probably be needed to determine the right behavior.
Related is #36507, which fixes the same issue in the navigation block. In that change we make the nav block go back to its placeholder when the associated menu id deleted or non-existent.That regressed and the message is back again 😞 .Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
WordPress trunk
Gutenberg trunk
Brave on Mac OS
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: