The Youtube subscribe button on our site has started to generate this mixed content type error just recently. It was working fine before.
Our site (https://data-miner.io) is fully on HTTPS. The URL for loading the Google script is also on HTTPS.
Even the example button off Google developer guide gives us the same error. Example code:
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channel="GoogleDevelopers"></div>
And we get this error:
Mixed Content: The page at 'https://data-miner.io/' was loaded over HTTPS,
but requested an insecure resource 'http://www.youtube.com/subscribe_embed?action_card=1&channelid=UCJsN_l9Nikc…res__%2Fam%3DAQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAGLTcCMHYgS7aNxNWsVBTJHTEp3IHdPl5g'.
This request has been blocked; the content must be served over HTTPS.
Is this a Google bug? Why are they trying to load something over http. Any help would be appreciated.
[UPDATE]: A week later and this is still broken. Google guys tried to fixed it and introduced yet another bug. Unbelivable! What kind of testing does this team do? "VM7438 subscribe_embed?channelid=UCJsN_l9NikcAq9XikLD1nSg&action_card=1&usegapi=1&jsh=m%3B%2F_%2Fsc…:22 Uncaught ReferenceError: __ytRIL is not defined
I've noticed the same error, and it appears to be a Google bug. You can see the same error occurring on YouTube's Configure a Button page. I submitted a bug report to YouTube's issue tracker, which you can follow here.