Site logo

Archived topic

Content disappears since Wordpress 6.2

7 replies · Started by Achim on March 30, 2023

Viewing posts 1–8 of 8

Hi,

I have a layout element that outputs the featured image on each page. Since upgrading to Wordpress 6.2, all the content below the featured image disappears (it's not in the DOM). As soon as I deactivate the element or deactivate GP Premium, the content is loaded again. I posted a video in the private information field as I upgraded to 6.2 only locally.

Hope you can help!
Best, Achim

BTW: If I rebuild the block with PHP, it works well:

$featured_image = get_the_post_thumbnail( get_the_ID(), 'full' );

if($featured_image):
    echo '<figure class="wp-block-post-featured-image">';
    echo $featured_image;
    echo '</figure>';
endif;

Hi there,

can you temporarily disable any other plugins and if using a child theme can you switch to the parent, then let me know.

OK - update.
We tracked it down to an issue with the core Post Featured Image block that you're using.
Can you replace that block in the element with a GenerateBlocks Image Block, and you can set its Dynamic Data options in the sidebar to show the Content Source > Featured Image.

Hey David,
thanks for your fast reply!

Replacing the block with a GenerateBlock would of course be an option, however this multisite does not have GeneratebBlocks installed and the Featured Image would be the only case why I would install the plugin.

I'll stick with the "manual" PHP solution for now and include the featured image as a template part via the generate_after_header hook.

FYI Tom has open a POC on this as its a bug that WP has introduced in 6.2.

Glad to hear you have a working solution.

Hey David,

great, thanks for your efforts.

Since my solution works well for me, I'll close the topic here.

Best,
Achim

This archived topic is closed to new replies.