I have successfully uploaded/configured Youtube video for a particular product but the video is not showing on the front-end, even though I marked the video as the 'base,' 'small' and 'thumbnail'.

I removed the cache, deployed the static content but the video is still not visible in front end.

I am getting below error in my console:

TypeError: window[this.configSource] is undefined 

Any help would be appreciated.

  • Is there any Browser console error? Commented Dec 26, 2016 at 14:05
  • I am getting the console error TypeError: window[this.configSource] is undefined Commented Dec 26, 2016 at 14:06
  • 1
    Can you update your question with the browser error? Commented Dec 26, 2016 at 14:09
  • Updated the question Commented Dec 26, 2016 at 14:10
  • What are your video settings located under Catalog > Catalog > Product Video
    – rob3000
    Commented Feb 22, 2018 at 8:58

2 Answers 2

$product = $this->getProduct();
$images = json_decode($block->getGalleryImagesJson(),true);
<div id="gallery-slider done" class="gallery-slider" data-mage-init='{"gallery":{}}'>
    <div class="viewport desktop owl-carousel" style="">
        <?php foreach ($images as $i => $image): ?>
            <?php if(isset($image['videoUrl'])) :?>
                <?php $altText = $image['caption'] ? $image['caption'] : $product->getName();
                $vimeo = $image['videoUrl'];
                $vid = (int) substr(parse_url($vimeo, PHP_URL_PATH), 1);;
                <iframe src="https://player.vimeo.com/video/<?php echo $vid ?>"
                        frameborder="0" title="<?php echo $altText ?>" webkitallowfullscreen mozallowfullscreen allowfullscreen style="width: 100%"></iframe>
            <?php else: ?>
                <?php $altText = $image['caption'] ? $image['caption'] : $product->getName(); ?>
                <img src="<?php echo $image['img']?>" alt="<?php echo $altText ?>">
            <?php endif; ?>
        <?php endforeach ?>
  • Please add description of code too.
    – Jarnail S
    Commented Jan 4, 2021 at 10:12

I had a similar problem. In my case was related to the way the video was on youtube. After trying a general one and confirming that the magento was running fine, I uploaded the video again and worked fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.