Problem with post-upgrade gallery
-
Hi, After update Woorommerce I have a lot of problems with the gallery and displaying products on the card. Previously I used versions 2.6.9 and everything worked well.
My problem is the incorrect code in the product-thumbnails.php and product-image.php templates. Previously everything was like this ( photos displayed in lightbox ):
<div class="images"> <a href="wp-content/uploads/2017/04/image.jpg" itemprop="image" class="woocommerce-main-image zoom" title="" data-rel="prettyPhoto[product-gallery]"><img width="558" height="600" src="2017/04/image-558x600.jpg" class="attachment-shop_single size-shop_single wp-post-image" alt="image_10" title="image_10" srcset="wp-content/uploads/2017/04/image.jpg 558w, wp-content/uploads/2017/02/image_10-279x300.jpg 279w" sizes="(max-width: 558px) 100vw, 558px"></a> <div class="thumbnails columns-3"><a href="wp-content/uploads/2017/02/image_10.jpg" class="zoom first" title="" data-rel="prettyPhoto[product-gallery]"><img width="180" height="180" src="wp-content/uploads/2017/02/image_10-180x180.jpg" class="attachment-shop_thumbnail size-shop_thumbnail" alt="image_10" title="image_10" caption="" url="wp-content/uploads/2017/02/image_10.jpg" srcset="wp-content/uploads/2017/02/image_10-180x180.jpg 180w, wp-content/uploads/2017/02/image_10-150x150.jpg 150w, wp-content/uploads/2017/02/image_10-300x300.jpg 300w" sizes="(max-width: 180px) 100vw, 180px"></a><a href="wp-content/uploads/2017/04/image_34.jpg" class="zoom" title="" data-rel="prettyPhoto[product-gallery]"><img width="180" height="180" src="/wp-content/uploads/2017/02/image_34-180x180.jpg" class="attachment-shop_thumbnail size-shop_thumbnail" alt="image_34" title="image_34" caption="" url="wp-content/uploads/2017/02/image_34.jpg" srcset="wp-content/uploads/2017/02/image_34-180x180.jpg 180w, wp-content/uploads/2017/02/image_34-150x150.jpg 150w, wp-content/uploads/2017/02/image_34-300x300.jpg 300w" sizes="(max-width: 180px) 100vw, 180px"></a><a href="wp-content/uploads/2017/02/image_31.jpg" class="zoom last" title="" data-rel="prettyPhoto[product-gallery]"><img width="180" height="180" src="wp-content/uploads/2017/02/image_31-180x180.jpg" class="attachment-shop_thumbnail size-shop_thumbnail" alt="image_31" title="image_31" caption="" url="wp-content/uploads/2017/02/image_31.jpg" srcset="wp-content/uploads/2017/02/image_31-180x180.jpg 180w, wp-content/uploads/2017/02/image_31-150x150.jpg 150w, wp-content/uploads/2017/02/image_31-300x300.jpg 300w" sizes="(max-width: 180px) 100vw, 180px"></a></div> </div>
Now, after updating: columns is broken, images are not displayed in lightbox and as a new subpage.
<div class="woocommerce-product-gallery woocommerce-product-gallery--with-images woocommerce-product-gallery--columns-4 images" data-columns="4" style="opacity: 1; transition: opacity 0.25s ease-in-out;"> <figure class="woocommerce-product-gallery__wrapper"> <div data-thumb="wp-content/uploads/2017/04/image-180x180.jpg" class="woocommerce-product-gallery__image"><a href="wp-content/uploads/2017/04/image.jpg"><img width="558" height="600" src="wp-content/uploads/2017/04/image-558x600.jpg" class="attachment-shop_single size-shop_single wp-post-image" alt="" title="" data-src="wp-content/uploads/2017/04/image.jpg" data-large_image="wp-content/uploads/2017/04/image.jpg" data-large_image_width="558" data-large_image_height="600" srcset="wp-content/uploads/2017/04/image.jpg 558w, wp-content/uploads/2017/04/image-279x300.jpg 279w" sizes="(max-width: 558px) 100vw, 558px"></a></div><div data-thumb="wp-content/uploads/2017/04/image-180x180.jpg" class="woocommerce-product-gallery__image"><a href="wp-content/uploads/2017/04/image.jpg"><img width="558" height="600" src="wp-content/uploads/2017/04/image-558x600.jpg" class="attachment-shop_single size-shop_single" alt="" title="" data-src="wp-content/uploads/2017/04/image.jpg" data-large_image="wp-content/uploads/2017/04/image.jpg" data-large_image_width="558" data-large_image_height="600" srcset="wp-content/uploads/2017/04/image.jpg 558w, wp-content/uploads/2017/04/image-279x300.jpg 279w" sizes="(max-width: 558px) 100vw, 558px"></a></div><div data-thumb="wp-content/uploads/2017/04/image_34-180x180.jpg" class="woocommerce-product-gallery__image"><a href="wp-content/uploads/2017/04/image_34.jpg"><img width="558" height="600" src="wp-content/uploads/2017/04/image_34-558x600.jpg" class="attachment-shop_single size-shop_single" alt="" title="" data-src="wp-content/uploads/2017/04/image_34.jpg" data-large_image="wp-content/uploads/2017/04/image_34.jpg" data-large_image_width="558" data-large_image_height="600" srcset="wp-content/uploads/2017/04/image_34.jpg 558w, wp-content/uploads/2017/04/image_34-279x300.jpg 279w" sizes="(max-width: 558px) 100vw, 558px"></a></div><div data-thumb="wp-content/uploads/2017/04/image_31-180x180.jpg" class="woocommerce-product-gallery__image"><a href="wp-content/uploads/2017/04/image_31.jpg"><img width="558" height="600" src="wp-content/uploads/2017/04/image_31-558x600.jpg" class="attachment-shop_single size-shop_single" alt="" title="" data-src="wp-content/uploads/2017/04/image_31.jpg" data-large_image="wp-content/uploads/2017/04/image_31.jpg" data-large_image_width="558" data-large_image_height="600" srcset="wp-content/uploads/2017/04/image_31.jpg 558w, wp-content/uploads/2017/04/image_31-279x300.jpg 279w" sizes="(max-width: 558px) 100vw, 558px"></a></div> </figure> </div> </div>
I worked a bit in code and I managed to restore the layout. Gallery still does not work and miniatures are non-click.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Problem with post-upgrade gallery’ is closed to new replies.