block_core_image_render_lightbox Causing 404 errors | WordPress.org

[ad_1]

Disclaimer: I am not an HTML developer and am making some assumptions here in an effort to provide as much information as possible. Help is appreciated.

In the function block_core_image_render_lightbox contained in /public_html/wp-includes/blocks/image.php there are calls created to read the attributes of an image for the LightBox effect.

state.currentImage.currentSrc and state.enlargedSrc

These are causing 404 errors on the website.
It appears to only happen when someone browses from iOS Google Chrome.

Of the many references to state.currentImage… the two above are the only ones that I see reporting an error. The image in question is using the “Expand on click – Scales the image with a lightbox effect” link type. All images on the site using “Expand on click” are showing errors when browed with iOS.

The lines as rendered in HTML look like....<div class="lightbox-image-container">
<figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.currentImage.figureStyles">
<img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="https://projectdmc.org/support/topic/block_core_image_render_lightbox-causing-404-errors/state.currentImage.currentSrc">
</figure>
</div>
<div class="lightbox-image-container">
<figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.currentImage.figureStyles">
<img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="https://projectdmc.org/support/topic/block_core_image_render_lightbox-causing-404-errors/state.enlargedSrc">
</figure>
</div>

When the 404 is reported it looks like this…

/destinations/palm-coast-florida/state.enlargedSrc
/destinations/palm-coast-florida/state.currentImage.currentSrc

the image URL is: https://thecleverboater.com/wp-content/uploads/2024/10/palm-coast-marinas-1-300×200.jpg

What appears to be happening is that the HTML in the browser is not able to render the image URL, so the resulting expansion of attributes just contains just the “state.enlargedSrc” or “state.currentImage.currentSrc” portion.

Does anyone have an idea on why this is happening, and how to fix or report it?

Thank You!

  • This topic was modified 2 hours, 8 minutes ago by JustPlainTom.

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer