2

I'm having issues with the add video button on the product pages in Magento 2.2.1. The button doesn't open the modal window even though I have added my Youtube api key and its enabled. I've done some digging and their arent any js errors. In fact, I can see all of the js scripts, for adding a video, load when I click on the "Images and Videos" fieldset wrapper. However, the required modal code isn't being injected into the page, so the onclick cant finds the modal in order to open it.

I'm at a loss on what could be preventing the modal code injection since I'm not seeing any errors.

EDIT: I've done a bit more digging and can varify that my youtube api key is working correctly. I found this in get-video-information.js

googleapisUrl = 'https://www.googleapis.com/youtube/v3/videos?id=' +
                    id + '&part=snippet,contentDetails,statistics,status&key=' +
                    this.options.youtubeKey + '&alt=json&callback=?';\

I hardcoded a video ID and my api key (copied directly out of the db) and used chrome to submit the request. I got a valid json response back with all of the video information. So, I suppose that proves my api key is working correctly.

0

Please create youtube API and add it to Magento 2 admin:

Stores > configuration > Catalog > Catalog > Product Video > Youtube API Key

For more info please check here

  • I already have my api key set and enabled. I've updated my og post to reflect that info. Any other debugging ideas? – sharmstr Jan 3 '18 at 12:39
  • 1
    I was never able to figure this out. Updating to Magento 2.2.2 solved the issue – sharmstr Jan 29 '18 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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