Site logo

Archived topic

Bloc – Hook – Content disappears since WP 6.2

6 replies · Started by Andre on March 31, 2023

Viewing posts 1–7 of 7

Hello,

In elements, I have a Block - Hook with this code that worked well until the Wordpress 6.2 update

Now, the content of the pages is not displayed anymore?
If I deactivate the Block - Hook concerned, it works again.

<!-- wp:post-featured-image {"width":"100%","height":""} /-->

Can you help me ?

Best regards, Andre

The content disappears from the code with the "inside_container" hook

Code :


<div class="site-content" id="content"> 
  <!-- wp:post-featured-image {"width":"100%","height":""} /-->
  <figure style="width:100%;" class="wp-block-post-featured-image"><img loading="lazy" width="850" height="850" src="https://espace-pondichery.ch/wp-content/uploads/2013/10/abyangha.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" srcset="https://espace-pondichery.ch/wp-content/uploads/2013/10/abyangha.jpg 850w, https://espace-pondichery.ch/wp-content/uploads/2013/10/abyangha-150x150.jpg 150w, https://espace-pondichery.ch/wp-content/uploads/2013/10/abyangha-300x300.jpg 300w, https://espace-pondichery.ch/wp-content/uploads/2013/10/abyangha-500x500.jpg 500w" sizes="(max-width: 850px) 100vw, 850px"></figure>

  <div class="content-area" id="primary">
    <main class="site-main" id="main"> </main>
  </div>
</div>

I followed your comment on https://generatepress.com/forums/topic/content-disappears-since-wordpress-6-2/
"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 had to add this CSS code to make the images the right size and square :

.dynamic-featured-image  {
	margin-right: 20px;
}
img.dynamic-featured-image {
	background-color: rgba(255, 255, 255, 0.65)!important;
	border-radius: 20px;
	padding: 40px;
	width:100%!important;
	height:100%!important;
}

But, if you have a solution to solve the problem of the content disappearing with the previous code (*), I would be happy :)

* <!-- wp:post-featured-image {"width":"100%","height":""} /-->

Thanks

PS: can you change the title of post "Bloc – Hook" to "Bloc – Hook - Content disappears since WP 6.2"

Hi there,

its a core error they introduced in WP 6.2. Tom has raised a POC here:

https://core.trac.wordpress.org/ticket/58027

Hopefully they will put a fix in place or if not people can use the GB Image Block or the GP Dynamic Image Block to get around it.

PPS: I changed the title.

Let me know if theres anything i can assist with further.

Thank you!
As long as it works with the GP blocks, it's all good for me.
Let's hope they find a (WP) fix for the future.
Have a good day, ++

You're welcome - have a good day too!

This archived topic is closed to new replies.