You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Latest Posts: Category restriction not working on existing blocks #21357
An existing Latest Posts block that shows posts from a category no longer filters the category, it shows all posts. Previous GB versions saved the category as a string, but the change in #20781 switched this to an array.
To reproduce
Using Gutenberg 7.7.1 (or other previous version), add a Latest Posts block with a selected category
Update to master, view your post — it's no longer respecting the category restriction
On the frontend, you get a PHP warning: array_column() expects parameter 1 to be array, string given in /var/www/html/wp-content/plugins/gutenberg/build/block-library/blocks/latest-posts.php on line 50
Switch into the editor, your category is no longer selected (and the attribute is removed, since it's invalid)
Activity