Responsive Image height and width #972
Comments
Just ran into this issue and was going to report it but glad to see someone else found it as well. The new Woocommerce 3.0 lightbox was broken giving me the "Cannot read property 'x' of undefined". Ended up disabling the "remove_thumbnail_dimensions" filter for now. It could possibly be wrapped in a "! is_woocommerce()" conditional if still needed elsewhere. |
Any fixes for this? I'm having display issues - found this trying to find a solution http://specializedsaddles.com/store/product/eurolight-saddle/ |
It seems that you have width set to 100% inside the style.css @media only screen and (max-width: 600px) {
div {
width: 100% !important;
float: left;
}
.woocommerce div.product .product_title, .woocommerce div.product div[itemprop="description"], .woocommerce div.product div[itemprop="offers"], .woocommerce div.product .button.summary, .woocommerce div.product .woocommerce-tabs {
width: 100% !important;
} I think this is cause your issue. |
Seems like you have answered your own question and fixed it yourself by tweaking the |
Heya,
I'm currently trying to setup a woocommerce shop with the foundationpress theme. Since a few days there is an issue regarding the new lightbox (photoswipe) wich woocommerce implemented in version 3.
Now the photoswipe plugin is trying to determine height and width of images on the single-product page.
What happens is when you enable the following theme support the zoom function breaks and the user is stuck in the zoom mode because no buttons work on the overlay.
This happens because inside the repsonsive-images.php there is this function wich removes the height and the width.
This one to be more specific:
This raises an error in the console with the following message:
Uncaught TypeError: Cannot read property 'x' of undefined
Wich is really fague and frustrating to deal with. After debugging and trying to locate the error I found out that in woocommerce assets (/js/frontend/single-product.js) the ProductGallery is trying to locate the width and height of the through attributes. Here is the snippet doing it. Can be found on line 219 in single-product.js
The properties
large_image_w
andlarge_image_h
are both undefined for the image wich is shown directly on the single-product page.Anyway I'm not sure if the removal of the width and height is neccesary, because my images remain responsive in my Woocommerce instance. However I don't know if this applies to everybody in other cases.
Hope this helps somebody if they run in the same issue as I did.
Keep up the great work with this theme, it really helped me develop my shop!
The text was updated successfully, but these errors were encountered: