Skip to content

Patterns: Theme patterns without Categories do not show in Library #52614

@colorful-tones

Description

@colorful-tones

Description

Issue

Theme patterns without the Categories (in pattern header) do not appear at all in the new Library (WP 6.3 beta 4), but they still appear in the block editor inserter library.

Expectation

It should be consistent for uncategorized patterns. Either infer that they're uncategorized and show them anyway under 'Uncategorized' in both the Editor and the inserter, or do not show them at all in either.

Step-by-step reproduction instructions

WordPress Beta Tester Plugin (v 3.5.2) and WP 6.3 beta-4 installed. Twenty Twenty-Three (v1.1) theme activated. That is all.

  1. Launch Editor > Patterns, and choose 'Featured' category (/wp-admin/site-editor.php?path=%2Fpatterns&categoryType=pattern&categoryId=featured). Notice there is one pattern: "Call to action"
  2. Open Twenty Twenty-Three's patterns/call-to-action.php file and remove line 5: * Categories: featured and save the file.

Repeat step #1 (above) and note that the 'Featured' category is gone and the "Call to action" pattern can not be found under any other category in the Editor.

However, you can still create a new post and open the inserter library, switch to the Patterns tab, and still find the "Call to action" pattern even when it does not have the * Categories: featured. I've tested this issue with and without the latest Gutenberg plugin activated and there is no change in impact.

Screenshots, screen recording, code snippet

Before After (theme pattern has no Categories)
Screenshot 2023-07-13 at 3 43 11 PM Screenshot 2023-07-13 at 3 47 48 PM
Screenshot 2023-07-13 at 3 54 56 PM Screenshot 2023-07-13 at 3 55 24 PM

Environment info

  • WordPress 6.3 beta-4
  • WordPress Beta Tester Plugin (v 3.5.2)
  • Twenty Twenty-Three (v1.1)
  • Chrome 114.0.5735.198
  • macOS 13.4.1

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

Metadata

Metadata

Assignees

Labels

[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions