Home Forums Basel – Premium Template Theme update – Gallery error

This topic contains 8 replies, has 4 voices, and was last updated by Elise Noromit Elise Noromit 2 months, 1 week ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #112866

    sevi342
    Customer

    Hello,

    after a theme update to the latest version I am having a problem with photo gallery. The error note is for example – Warning
    : getimagesize(https://i0.wp.com/webypro-test1.cz/wp-content/uploads/2018/12/Snímek3.jpg?fit=453%2C254): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in
    /data/web/virtuals/201248/virtual/www/domains/webypro-test1.cz/wp-content/themes/basel/inc/shortcodes/shortcodes.php
    on line
    1401

    This problem is visible on my HP for example.

    Private Content Hidden
    #112967

    Hello,

    I cannot view or enter your site http://prntscr.com/mxuw8o

    Please update and provide access

    Best Regards

    #112974

    sevi342
    Customer

    Hi, now it seems okay. Propably an issue of my webhosting provider.

    Jan

    Private Content Hidden
    #113039

    That is fine. If you have any questions please feel free to contact us.

    Best Regards

    #113049

    sevi342
    Customer

    No, the issue persist. I meant the website wasn’t accessible because of the problem of my webhosting provider.

    Please look into that.

    All the best.

    #113051

    kwoodberry
    Customer

    I think it’s a buggy thing with Jetpack and the theme…

    #113076

    Hello,

    You need to edit the file basel\inc\shortcodes\shortcodes.php and replace the 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

    #113127

    sevi342
    Customer

    Working perfectly! Thank you for your help.

    Jan

    #113177

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

    Best Regards

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

The topic ‘Theme update – Gallery error’ is closed to new replies.