- This topic has 6 replies, 2 voices, and was last updated 2 years, 11 months ago by
David.
-
AuthorPosts
-
March 31, 2023 at 3:58 am #2590365
Andre
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
March 31, 2023 at 4:19 am #2590403Andre
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>March 31, 2023 at 6:40 am #2590563Andre
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
March 31, 2023 at 6:47 am #2590573Andre
PS: can you change the title of post “Bloc – Hook” to “Bloc – Hook – Content disappears since WP 6.2”
March 31, 2023 at 7:09 am #2590604David
StaffCustomer SupportHi 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.
March 31, 2023 at 7:37 am #2590653Andre
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, ++April 1, 2023 at 4:42 am #2591856David
StaffCustomer SupportYou’re welcome – have a good day too!
-
AuthorPosts
- You must be logged in to reply to this topic.