The gallery to still display in the Block Editor
The error "This block has encountered an error and cannot be previewed."
Switching to the code editor the code changes from the following when it works:
<!-- wp:jetpack/tiled-gallery {"ids":[175447107,175447106,175447105]} -->
<div class="wp-block-jetpack-tiled-gallery aligncenter is-style-rectangular"><div class="tiled-gallery__gallery"><div class="tiled-gallery__row"><div class="tiled-gallery__col"><figure class="tiled-gallery__item"><img alt="" aria-label="image 1 of 3 in gallery" data-height="640" data-id="175447107" data-link="https://k2testblog.wordpress.com/gallery/attachment/9/" data-url="https://k2testblog.files.wordpress.com/2019/01/9.jpg?w=820" data-width="1920" src="https://k2testblog.files.wordpress.com/2019/01/9.jpg"/></figure></div></div><div class="tiled-gallery__row"><div class="tiled-gallery__col"><figure class="tiled-gallery__item"><img alt="" aria-label="image 2 of 3 in gallery" data-height="640" data-id="175447106" data-link="https://k2testblog.wordpress.com/gallery/attachment/8/" data-url="https://k2testblog.files.wordpress.com/2019/01/8.jpg?w=820" data-width="1920" src="https://k2testblog.files.wordpress.com/2019/01/8.jpg"/></figure></div></div><div class="tiled-gallery__row"><div class="tiled-gallery__col"><figure class="tiled-gallery__item"><img alt="" aria-label="image 3 of 3 in gallery" data-height="640" data-id="175447105" data-link="https://k2testblog.wordpress.com/gallery/attachment/7/" data-url="https://k2testblog.files.wordpress.com/2019/01/7.jpg?w=820" data-width="1920" src="https://k2testblog.files.wordpress.com/2019/01/7.jpg"/></figure></div></div></div></div>
<!-- /wp:jetpack/tiled-gallery -->
To this when it doesn't after refreshing:
<!-- wp:jetpack/tiled-gallery {"ids":[175447107,175447106,175447105]} -->
<div class="wp-block-jetpack-tiled-gallery aligncenter is-style-rectangular"><div class="tiled-gallery__gallery"><div class="tiled-gallery__row"><div class="tiled-gallery__col"><figure class="tiled-gallery__item"><img alt="" aria-label="image 1 of 3 in gallery" data-id="175447107" data-link="https://k2testblog.wordpress.com/gallery/attachment/9/" src="https://k2testblog.files.wordpress.com/2019/01/9.jpg" /></figure></div></div><div class="tiled-gallery__row"><div class="tiled-gallery__col"><figure class="tiled-gallery__item"><img alt="" aria-label="image 2 of 3 in gallery" data-id="175447106" data-link="https://k2testblog.wordpress.com/gallery/attachment/8/" src="https://k2testblog.files.wordpress.com/2019/01/8.jpg" /></figure></div></div><div class="tiled-gallery__row"><div class="tiled-gallery__col"><figure class="tiled-gallery__item"><img alt="" aria-label="image 3 of 3 in gallery" data-id="175447105" data-link="https://k2testblog.wordpress.com/gallery/attachment/7/" src="https://k2testblog.files.wordpress.com/2019/01/7.jpg" /></figure></div></div></div></div>
<!-- /wp:jetpack/tiled-gallery -->
Note the date-width, data-height, and data-url all missing post-refresh. I was not able to reproduce this on an Atomic site using the core Block Editor.
Chrome 70.0.3538.11
OS X 10
Before refreshing
After refreshing
/cc @Automattic/gutenpack
A few questions to confirm to help us track this down:
I tested this a bit, and I am able to reproduce this both on Gutenlypso (Gutenberg on Calypso) and on Calypsoified Gutenberg ({site}/wp-admin/post-new.php
).
Tested on a simple site. Admin role.
Same with Author
role.
Contributor
role doesn't seem to have the ability to upload/manage media - so doesn't matter.
On Atomic though, I am not seeing this behaviour. On refreshing the tiled gallery block appears fine. 馃憤馃徑
This regression seems to come from a change to the way attributes are filtered. Details in p3btAN-12t-p2
cc: @xknown
Fixed by D23530-code
Most helpful comment
/cc @Automattic/gutenpack