• Resolved JustPlainTom

    (@laheysc)


    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="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="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 1 year, 5 months ago by JustPlainTom.

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

Viewing 1 replies (of 1 total)
  • Thread Starter JustPlainTom

    (@laheysc)

    Solved! Sort of….

    So the issue is with a Caching plugin called Breeze and another called ObjectCache.

    Both installed by my hosting provider Cloudways.

    If LazyLoad images is turned on, this problem occurs, if I turn off LazyLoad images the problem goes away. Also, if I disable the ObjectCache plugin, I can leave the LazyLoad option in Breeze turned on and not get the issue. So it appears to be some conflict between the two.

    I’ve turned off LazyLoad images in Breeze for now, and will monitor the result to see if that stops the 404s from happening.

    Hope that points someone in the right direction in the future!

    • This reply was modified 1 year, 5 months ago by JustPlainTom.
Viewing 1 replies (of 1 total)

The topic ‘block_core_image_render_lightbox Causing 404 errors’ is closed to new replies.