-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Closed
Copy link
Labels
Needs TestingNeeds further testing to be confirmed.Needs further testing to be confirmed.[Feature] InserterThe main way to insert blocks using the + button in the editing interfaceThe main way to insert blocks using the + button in the editing interface[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsyncedA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
Inserter modal doesn't show patterns that contains other patterns.
Step-by-step reproduction instructions
- Create a first pattern (will be our main pattern) and add it to your theme in
/patterns/(ex:test-pattern-1.php) :
<?php
/**
* Title: Test pattern 1
* Slug: abc/test-pattern-1
* Categories: abc
* Description: Test parent pattern issue
* Keywords: test, parent, pattern
* Block Types: core/post-content
* Post Types: post, page
* Inserter: true
* Viewport Width: 1200
* Source: theme
*/
?>
<!-- wp:pattern {"slug":"abc/test-pattern-2"} /-->- Create a second pattern (will be our inner pattern) and add it to your theme in
/patterns/(ex:test-pattern-2.php) :
<?php
/**
* Title: Test pattern 2
* Slug: abc/test-pattern-2
* Categories: abc
* Description: Test pattern issue
* Keywords: test, pattern
* Block Types: core/paragraph
* Viewport Width: 1200
* Source: theme
*/
?>
<!-- wp:paragraph -->
<p>My text paragraph</p>
<!-- /wp:paragraph -->-
Go to Pages (or Posts), then click on "Add new"
-
Inserter modal should popup and allow you to select the pattern "Test pattern 1" but nothing happens:

-
Edit
test-pattern-1.phpto replacewp:patterncode with direct block code oftest-pattern-2.phpand save:
<?php
/**
* Title: Test pattern 1
* Slug: abc/test-pattern-1
* Categories: abc
* Description: Test pattern issue
* Keywords: test, pattern
* Block Types: core/post-content
* Post Types: post, page
* Inserter: true
* Viewport Width: 1200
* Source: theme
*/
?>
<!-- wp:paragraph -->
<p>My text paragraph</p>
<!-- /wp:paragraph -->Screenshots, screen recording, code snippet
Environment info
- WordPress: 6.4.3 (LTS)
- Gutenberg (same as WP 6.4.3)
- Browser: Chrome
- OS: Windows
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs TestingNeeds further testing to be confirmed.Needs further testing to be confirmed.[Feature] InserterThe main way to insert blocks using the + button in the editing interfaceThe main way to insert blocks using the + button in the editing interface[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsyncedA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.


