WordPress.org

Forums

Youtube Feeder
[resolved] SSL insecure content (7 posts)

  1. webaware
    Member
    Posted 3 years ago #

    This plugin is loading its script and CSS using the WP_PLUGIN_URL constant instead of the plugin_dir_url() function, so it triggers insecure content warnings on SSL pages. I've added a "fix" for this plugin to my SSL Insecure Content Fixer plugin, but you should make the following changes to avoid these warnings without the aid of my dirty kludge :) (and also avoid a WordPress debug warning)

    * use the init, wp_print_styles and wp_print_scripts actions for enqueuing scripts and CSS (i.e. they should not be enqueued until after the init action)
    * use the wp_print_styles action to enqueue your CSS, instead of printing it from wp_head action
    * use plugin_dir_url() to get your plugin dir, instead of WP_PLUGIN_URL, so that it handles the transition to SSL (HTTPS)

    Once you've released a version that fixes these, please let me know and I'll remove the "fix" for your plugin.

    http://wordpress.org/extend/plugins/youtube-feeder/

  2. Andrew Ensley
    Member
    Plugin Author

    Posted 3 years ago #

    Thank you for letting me know about this. I will work on it and update here when a fix is released.

  3. Andrew Ensley
    Member
    Plugin Author

    Posted 3 years ago #

    Version 2.0.0 is out which enqueues scripts and styles properly:

    http://wordpress.org/extend/plugins/youtube-feeder/

    Thanks.

  4. webaware
    Member
    Posted 3 years ago #

    G'day Andrew, thanks for the update. I'm just removing the hack for your plugin from the SSL insecure content fixer now, and will release a new version in a minute.

    I note that you're still embedding the Youtube videos from http:// however, so any pages using SSL and embedding Youtube will still get the warning about insecure content. You can get around that by dropping the protocol from the iframe source links, e.g. in YoutubeFeeder::youtubeMinimalStyle() you can change line 437 to this:

    $url = '//www.youtube.com/embed/' . $vid['id'] . '?' . $this->getEmbedParams($playback);

    That will embed using whichever protocol was used to load the page, http or https. You would need to apply that to the Youtube playlist script as well.

    cheers,
    Ross

  5. Andrew Ensley
    Member
    Plugin Author

    Posted 3 years ago #

    Ah, silly me. I didn't even consider those links (duh).

    I'll release a fix in the next couple of days (no time right now).

    Thanks for letting me know. I really appreciate the feedback.

  6. Andrew Ensley
    Member
    Plugin Author

    Posted 3 years ago #

    Version 2.0.1 is out which fixes the embed urls:

    http://wordpress.org/extend/plugins/youtube-feeder/

    I'm pretty sure I got all of them this time. :-)

  7. webaware
    Member
    Posted 3 years ago #

    G'day Andrew, well done; I'm sure your plugin users will thank you for it :)

    cheers,
    Ross

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Youtube Feeder
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic