Patterns: Theme patterns without Categories do not show in Library #52614
Labels
[Feature] Patterns
A collection of blocks that can be synced (previously reusable blocks) or unsynced
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Bug
An existing feature does not function as intended
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.
/wp-admin/site-editor.php?path=%2Fpatterns&categoryType=pattern&categoryId=featured
). Notice there is one pattern: "Call to action"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
Categories
)Environment info
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
The text was updated successfully, but these errors were encountered: