Home Forums Space themes support forum SINGLE PRODUCT GALLERY IMAGE CREATES FATEL ERROR

SINGLE PRODUCT GALLERY IMAGE CREATES FATEL ERROR

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #346636

    zeeshanonline
    Participant

    Hi, https://laptopaccessories.pk/ is my website, when I upload a gallery image, the whole layout of a single page destroys and gives a fatal error on that page:

    FATAL Error!

    : Uncaught DivisionByZeroError: Division by zero in /home/laptetww/public_html/wp-content/themes/HShop/framework/modules/lazy-loading/class-lazy-loading.php:544
    Stack trace:
    #0 /home/laptetww/public_html/wp-content/themes/HShop/framework/modules/lazy-loading/class-lazy-loading.php(422): XTS\Modules\Lazy_Loading->get_placeholder_size()
    #1 /home/laptetww/public_html/wp-content/themes/HShop/framework/modules/lazy-loading/class-lazy-loading.php(376): XTS\Modules\Lazy_Loading->get_attachment_placeholder()
    #2 /home/laptetww/public_html/wp-includes/class-wp-hook.php(303): XTS\Modules\Lazy_Loading->get_lazy_attributes()
    #3 /home/laptetww/public_html/wp-includes/plugin.php(189): WP_Hook->apply_filters()
    #4 /home/laptetww/public_html/wp-includes/media.php(1090): apply_filters()
    #5 /home/laptetww/public_html/wp-content/themes/HShop/framework/integration/woocommerce/template-tags/single-product.php(423): wp_get_attachment_image()
    #6 /home/laptetww/public_html/wp-content/themes/HShop/framework/integration/woocommerce/template-tags/single-product.php(367): xts_wc_get_gallery_image_html()
    #7 /home/laptetww/public_html/wp-content/themes/HShop/woocommerce/single-product/product-thumbnails.php(32): xts_wc_get_gallery_html()
    #8 /home/laptetww/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/home/laptetww/…’)
    #9 /home/laptetww/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1538): wc_get_template()
    #10 /home/laptetww/public_html/wp-includes/class-wp-hook.php(303): woocommerce_show_product_thumbnails()
    #11 /home/laptetww/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #12 /home/laptetww/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
    #13 /home/laptetww/public_html/wp-content/themes/HShop/woocommerce/single-product/product-image.php(176): do_action()
    #14 /home/laptetww/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/home/laptetww/…’)
    #15 /home/laptetww/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1529): wc_get_template()
    #16 /home/laptetww/public_html/wp-includes/class-wp-hook.php(303): woocommerce_show_product_images()
    #17 /home/laptetww/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #18 /home/laptetww/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
    #19 /home/laptetww/public_html/wp-content/themes/HShop/woocommerce/content-single-product.php(58): do_action()
    #20 /home/laptetww/public_html/wp-includes/template.php(772): require(‘/home/laptetww/…’)
    #21 /home/laptetww/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(284): load_template()
    #22 /home/laptetww/public_html/wp-content/plugins/woocommerce/templates/single-product.php(37): wc_get_template_part()
    #23 /home/laptetww/public_html/wp-includes/template-loader.php(106): include(‘/home/laptetww/…’)
    #24 /home/laptetww/public_html/wp-blog-header.php(19): require_once(‘/home/laptetww/…’)
    #25 /home/laptetww/public_html/index.php(17): require(‘/home/laptetww/…’)
    #26 {main}
    thrown in

    #346712

    Artem Temos
    Keymaster

    Hello,

    Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it?

    Thank you in advance

    #349129

    zeeshanonline
    Participant

    Hi, I have checked by disabling plugins, still same issue, please have a look

    #349164

    Artem Temos
    Keymaster

    Please, send us a link to the page where we can see this error on your website.

    Thank you

    #349234

    zeeshanonline
    Participant

    Please try to add product, and add gallery images, and view product, it will break the single product page layout.

    #349320

    Artem Temos
    Keymaster

    Hello,

    You need to edit file framework/modules/lazy-loading/class-lazy-loading.php line 424 as shown on the screenshot https://prnt.sc/21z7do5

    if ( 0 === $height ) {
    	$height = $width;
    }

    We will fix it in our next update.

    Kind Regards

Tagged: 

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