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
The "Latest Post" block is not usable if a site has disabled all intermediate image sizes.
To reproduce
Steps to reproduce the behavior:
Add add_filter( 'intermediate_image_sizes', '__return_empty_array' ); to your theme's functions.php
Create a new post & add the "Latest Posts" block.
Note the broken block: "This block has encountered an error and cannot be previewed."
What's happening
Error: An error occurred while running 'mapSelect': Cannot read property 'width' of undefined
The error may be correlated with this previous error:
TypeError: Cannot read property 'width' of undefined
at https://vip.test/wp-includes/js/dist/block-library.min.js?ver=f710d3cc99e7a55a0d6a5418f3cfe33c:9:209846
For me it looks like a Bug in Gutenberg itself to rely on data which is not ensured via a default in JavaScript and is not localized when set.
The latest-posts-Block should be updated in a way, which does only use images when at least 1 imageDimension is set. Otherwhise the "image"-option shouldn't be visible at all.
Description
The "Latest Post" block is not usable if a site has disabled all intermediate image sizes.
To reproduce
Steps to reproduce the behavior:
add_filter( 'intermediate_image_sizes', '__return_empty_array' );
to your theme's functions.phpWhat's happening
The noted error happens here:
gutenberg/packages/block-library/src/latest-posts/edit.js
Line 478 in 59324b9
Can replicate pretty easily with just this in the console:
Editor version
The text was updated successfully, but these errors were encountered: