We’re currently having a really strange issue with a store that we look after for a client
https://www.ediblehealth.com/products/hydrolysed-bovine-collagen-powder
When the Size variations are changed, it gives an error:
Uncaught TypeError: mediaGallery.setActiveMedia is not a function
This error is stopping images and prices from changing and also stopping the Add to Cart button from being clickable, so we need to resolve it. I’ve been through the global.js and the media-gallery.js files so many times now and it seems to be in relation to this line in the global.js, but this is not something that we’ve ever modified and even replacing these two entire JavaScript files with the default Dawn stuff does not fix the issue
mediaGalleries.forEach(mediaGallery => mediaGallery.setActiveMedia(${this.dataset.section}-${this.currentVariant.featured_media.id}, true));
There must be something else in the website that’s causing this issue but we cannot figure out what. Has anybody else came across this error? The theme is a customisation of Dawn 7.0.1, I tried to install another copy of the base Dawn 7.0.1 theme and that seems to work fine so I don’t think it’s an app conflict?