Closed
Description
openedon Apr 2, 2020
Describe the bug
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment