Patterns: Proper handling when a pattern does not have a title #54693
Labels
[Feature] Patterns
A collection of blocks that can be synced (previously reusable blocks) or unsynced
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
What problem does this address?
When registering a pattern from the Site Editor, it can be registered without a title.
This in itself may need to be prevented, but since the pattern is a type of post, you can create a pattern without a title from
post-new.php?post_type=wp_block
. Therefore, I think we need to properly handle the assumption that the pattern has no title.As far as I have encountered, the following problems have occurred in the no-title pattern.
Screenshot
Screenshot
Screenshot
When duplicating a pattern, an error occurs.It turns out that this problem occurs not when the title is empty, but when it doesn't have a category. I have newly reported it as #54729.
Screenshot
json.json
: fixed by Patterns: Use slug as fallback for empty title #54731Screenshot
Screenshot
What is your proposed solution?
As for the Javascript error, I think it should be corrected fixed. As far as displaying the title, I think it should have a fallback title, such as "(no title)" or "the pattern".
The text was updated successfully, but these errors were encountered: