voceconnect / multi-post-thumbnails

Adds multiple post thumbnails to a post type. If you've ever wanted more than one Featured Image on a post, this plugin is for you.
143 stars 63 forks source link

Update to work with Block Editor #150

Closed szczys closed 4 years ago

szczys commented 4 years ago

Wordpress is moving toward the Gutenberg block editor. Multi-post-thumbnails has a performance quirk with the block editor:

This should be fix. I'm looking into it but my unfamiliarity with the plugin code base makes this a slow process.

szczys commented 4 years ago

It's likely that meta_boxes are what have changed and need to be converted to blocks: https://developer.wordpress.org/block-editor/developers/backward-compatibility/meta-box/

rickcurran commented 4 years ago

I'm not seeing the behaviour you're seeing. I have the additional thumbnail meta boxes on the right hand side, I can move them up and down and they stay on the right hand side. Meta boxes still work pretty much as before even with the block editor, so this should still work the same. Does this only happen to you for the multi-post thumbnail meta boxes? If you have any others it would be worth seeing if the same thing happened. It might be also worth checking if you've got any other plugins or code in your theme that might affect the behaviour of meta boxes in case there's something else affecting them here.

szczys commented 4 years ago

Thanks for testing this.

I tried it again and it seems the right sidebar meta box moves out of the sidebar and below the block editor area when you click the meta box up arrow and it is the top item that can be adjusted. Here is what those sidebar meta boxes look like for me, in this example clicking the up arrow on Blogview Image moves the metabox out of the sidebar: Screenshot from 2020-11-24 11-43-14

Yes, I do have one other plugin whose meta box is missing from the gutenberg editor completely. I'll test turning off all plugins and see if that narrows down the cause.

Edit: Seems you can drag those boxes back into the bottom of the sidebar. But overall I think the difference in look and behavior of these boxes indicates that the approach is deprecated and should be updated to where Wordpress is going with Gutenberg. It looks like there are hooks for old and new so this should be possible without breaking it for people sticking with MCE editor.

szczys commented 4 years ago

So it looks like meta boxes are still supported by Gutenberg. This is just a styling bug and there is already an issue for it in the tracker: https://core.trac.wordpress.org/ticket/51284