Home Forums WoodMart support forum 504 Errors

504 Errors

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #112716

    jcbdesign
    Participant

    Hi Guys,

    I’m getting 504 errors several times a day when accessing and working on my site. Very similar to a recent post (https://xtemos.com/forums/topic/504-gateway-time-out-when-loading-certain-pages/). Please can you tell me what you changed on the server to mitigate these errors or could you have a look at my configuration?

    Thanks
    Jon

    #112739

    Artem Temos
    Keymaster

    Hello,

    Try to edit the file woodmart/inc/shortcodes/images-gallery.php and replace this code

    $link = wp_get_attachment_image_url( $img_id, 'full' );
    $image_sizes = getimagesize( $link );

    with this one

    $image_data = wp_get_attachment_image_src( $img_id, 'full' );
    $link = $image_data[0];

    and also this part

    <a href="<?php echo esc_url( $link ); ?>" data-index="<?php echo esc_attr( $i ); ?>" data-width="<?php echo esc_attr( $image_sizes[0] ); ?>" data-height="<?php echo esc_attr( $image_sizes[1] ); ?>" <?php if( $target_blank ): ?>target="_blank"<?php endif; ?> <?php if( $caption ): ?>title="<?php echo esc_attr( $title ); ?>"<?php endif; ?>>

    to this

    <a href="<?php echo esc_url( $link ); ?>" data-index="<?php echo esc_attr( $i ); ?>" data-width="<?php echo esc_attr( $image_data[1] ); ?>" data-height="<?php echo esc_attr( $image_data[2] ); ?>" <?php if( $target_blank ): ?>target="_blank"<?php endif; ?> <?php if( $caption ): ?>title="<?php echo esc_attr( $title ); ?>"<?php endif; ?>>

    Regards

    #112750

    jcbdesign
    Participant

    Thank you, I’ll give it a try

    #112776

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘504 Errors’ is closed to new replies.