-
Author
-
May 7, 2018 at 17:07 #197015
estepix
ParticipantHello,
I’m Rafael, from Cherrypick. There is a bug while opening (magnifying) a thumbnail in a product page.
Environment:
WP Core: 4.9.5
Kleo Theme: 4.3.6
Web server: Apache
PHP: 7.0
In a product page, after clicking the product main image the lightbox tries to load the image “undefined”. You can see live at:
https://seventhqueen.com/themes/kleo/shop/premium-quality/
If you click the main image, before any other thumbnail click, you will see a 404 error in developer console:
GET https://seventhqueen.com/themes/kleo/shop/premium-quality/undefined 404 ()
It ‘s happening since 4.3.5 update and it is related to Woocommerce page:
wp-content/themes/kleo/woocommerce/single-product/product-thumbnails.php
and
wp-content/themes/kleo/assets/js/app.js (&min.js)
There is a call to updateGalleryItems method with an element with class a.zoom.selected as argument, but there isn’t any class “a.zoom.selected” after page rendering:
KLEO.shop.updateGalleryItems($(“.kleo-woo-gallery a.zoom.selected”));
so first image in the array wooGalItems is “Undefined” because there isn’t any element that match with selected class:
KLEO.shop.wooGalItems = [{src: elem.attr(‘href’)}];
Before the update, class “zoom first selected” was assigned to main image thumbnail:
<a data-big-img=”<?php echo $main_full_img; ?>” id=”product-thumb-0″ href=”<?php echo $image_link; ?>” class=”zoom first selected”>
Could you please take a look at this?
Thanks in advance. Regards,
Rafael Lavela.
-
AuthorPosts
The forum ‘Bugs & Issues’ is closed to new topics and replies.