'Blocked loading mixed active content' error trying to play a video in Lightbox?'Blocked loading mixed active content' error trying to play a video in Lightbox?


Are you receiving the 'Blocked loading mixed active content' error when trying to play a video (YouTube or otherwise) through Lightbox? Well, it's a fairly simple one to diagnose, but without Firebug you might not even see the error and just receive a blank white screen of death (or greyed out embed code).

It occurs, because most likely you are trying to load the video through http:// whereas you are viewing the entire page through https://. Browsers don't like a mix of the two as it can be insecure.

Annoyingly, the Drupal lightbox plug-in has hard-coded the paths to it's modal video content. So even if you enter the url as, for example, https://www.youtube.com/watch?v=QH2-TGUlwu4, it will still try to display the insecure version of http://www.youtube.com/watch?v=QH2-TGUlwu4.


Simple fix, head on into modules/lightbox2/js/lightbox_video.js and change those paths! Have a search in there for 'http://' and change the relevant (or all) paths to 'https://'.

Reupload the file, clear those caches, breath a sigh of relief and go and pour your next cup of coffee...

lightbox_video.js.txt - Drupal 78.25 KB


Post new comment