Home Forums Basel support forum Theme update – Gallery error

Theme update – Gallery error

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

    sevi342
    Participant

    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.

    #112967

    Hello,

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

    Please update and provide access

    Best Regards

    #112974

    sevi342
    Participant

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

    Jan

    #113039

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

    Best Regards

    #113049

    sevi342
    Participant

    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
    Participant

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

    #113076

    Artem Temos
    Keymaster

    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
    Participant

    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.