Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Https Insecure Image


Best Answer markphipps, 01 April 2015 - 07:56 AM

This problem is happening when "Use High Quality Thumbnails" and "Enable HTTPS" are both checked in the setting.  The high quality thumbnails are being generated, but the link provided is regular http.

 

As a temporary patch, I modified the bottom of the ProHttpItemListener.php to re-write the url before setting the item.  Approximately line 35:

 

do {
 
            $url = $thumbs->item($x--)->getAttribute('url');
 
} while (strpos($url, 'hqdefault') === FALSE);
 
// mdp April 1st, 2015 this is broken! for now, put in a temp hack to force https
$url = 'https://' . substr($url,7);
 
$mediaItem->setAttribute(tubepress_app_api_media_MediaItem::ATTRIBUTE_THUMBNAIL_URL, $url);
Go to the full post


  • Please log in to reply
16 replies to this topic

#1 ahowlett

ahowlett

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 18 March 2015 - 12:01 PM

My site is using tubepress pro.  We setup an ssl certificate and are getting a Mixed Content warning loading the image that is displayed for the videos.  We have the pro version and I checked the enable https option in the advanced tab.  I also updated the tubepress.js file and the youtubeextension.php file to reference https://youtube.cominstead of http://youtube.com.  What can I do to make sure we are only getting images over https?



#2 brandon

brandon

    Advanced Member

  • TubePress Staff
  • 1989 posts

Posted 19 March 2015 - 05:12 PM

ahowlett,

 

What version of TubePress are you using?

 

Thanks!


Want a faster, more personalized support experience? Open a ticket with us! We will be gradually phasing out forum-based support in favor of a proper ticketing system. Please help us help you!


#3 ahowlett

ahowlett

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 19 March 2015 - 05:20 PM

tubepress pro 4.0.8



#4 brandon

brandon

    Advanced Member

  • TubePress Staff
  • 1989 posts

Posted 21 March 2015 - 12:07 PM

Can you please provide a link to your site so we can look into this issue?

 

Thanks!


Want a faster, more personalized support experience? Open a ticket with us! We will be gradually phasing out forum-based support in favor of a proper ticketing system. Please help us help you!


#5 ahowlett

ahowlett

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 21 March 2015 - 05:51 PM

https://viralhog.com/

 

Thank you.



#6 brandon

brandon

    Advanced Member

  • TubePress Staff
  • 1989 posts

Posted 23 March 2015 - 09:00 PM

One more request, can you please enable tubepress debugging?

 

Thanks!


Want a faster, more personalized support experience? Open a ticket with us! We will be gradually phasing out forum-based support in favor of a proper ticketing system. Please help us help you!


#7 ahowlett

ahowlett

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 24 March 2015 - 11:13 AM

It is turned on, but we will only be keeping it on for 1 day because we don't want delays on our site.  If you could respond in that time we would appreciate it.

 

Thank you.



#8 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 25 March 2015 - 02:04 AM

Thanks for posting a link and turning on debugging. I tried to reproduce this issue on my test system and for me the thumbnail images were showing up correctly as HTTPS. So we'll need to do some digging to get at the cause.
 

We have the pro version and I checked the enable https option in the advanced tab. I also updated the tubepress.js file and the youtubeextension.php file to reference https://youtube.com instead of http://youtube.com.

 
Ticking that "Enable HTTPS" checkbox should be all you need to do; there shouldn't be any reason to edit any files manually (unless of course, there's a bug).
 
Let's try this. Please change the shortcode on your site from

[tubepress mode="playlist" playlistValue="5b4qDBro84rEx666zJNaOexxopgTUAMg" resultsPerPage="6"]

to

[tubepress mode="playlist" playlistValue="5b4qDBro84rEx666zJNaOexxopgTUAMg" resultsPerPage="6" https="true"] 

You could brute force the solution by adding a line to tubepress-content/add-ons/youtube-black-bars-remover_4.0.0/classes/tubepress/bbr/impl/listeners/media/MqDefaultListener.php.  Around line 94 change the code from:

$existingThumbnailUrl->setPath($newPath);

to

$existingThumbnailUrl->setPath($newPath);
$existingThumbnailUrl->setScheme('https');

But this of course is just a patch and isn't really getting to the root of the problem.
 
Let us know what you think! Thanks
 
Side note - keeping debugging enabled won't affect performance; it's just a relatively small privacy/security risk as you are revealing some internals of your server (filesystem paths and TubePress configuration). That's the reason we suggest leaving it disabled once everything is working properly.



#9 markphipps

markphipps

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 25 March 2015 - 01:04 PM

I'm having the same problem with the same version.



#10 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 25 March 2015 - 03:11 PM

I'm having the same problem with the same version.

 

Do you have a link to your site that you could share? Feel free to PM me if you can't share it publicly.



#11 markphipps

markphipps

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 25 March 2015 - 03:40 PM

Sent you a private message.



#12 markphipps

markphipps

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 25 March 2015 - 03:49 PM

Mixed Content: The page at 'https://www.oneemco.ca/sample-page/'was loaded over HTTPS, but requested an insecure image 'http://i.ytimg.com/vi/if0dZwL8h4k/hqdefault.jpg'. This content should also be served over HTTPS.



#13 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 25 March 2015 - 04:36 PM

Thanks - working on reproducing the issue now.



#14 ahowlett

ahowlett

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 26 March 2015 - 09:54 AM

$existingThumbnailUrl->setPath($newPath);
$existingThumbnailUrl->setScheme('https');

But this of course is just a patch and isn't really getting to the root of the problem.
 

 

Thank you so much, Eric!  Adding that line removed the warning, which is great for now.  It would be nice to fix the actual problem so the plugin's native functionality is working and we don't need to worry about updates overwriting the change.  What can I do to get to the root of the problem?



#15 markphipps

markphipps

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 01 April 2015 - 07:56 AM   Best Answer

This problem is happening when "Use High Quality Thumbnails" and "Enable HTTPS" are both checked in the setting.  The high quality thumbnails are being generated, but the link provided is regular http.

 

As a temporary patch, I modified the bottom of the ProHttpItemListener.php to re-write the url before setting the item.  Approximately line 35:

 

do {
 
            $url = $thumbs->item($x--)->getAttribute('url');
 
} while (strpos($url, 'hqdefault') === FALSE);
 
// mdp April 1st, 2015 this is broken! for now, put in a temp hack to force https
$url = 'https://' . substr($url,7);
 
$mediaItem->setAttribute(tubepress_app_api_media_MediaItem::ATTRIBUTE_THUMBNAIL_URL, $url);


#16 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 03 April 2015 - 02:44 AM

I've just published version 4.0.1 of the YouTube Black Bars Remover add-on. This version includes the fix for the mixed-content warning.

 

The upgrade process is as follows:

  1. Remove your existing copy of the add-on by deleting the entire tubepress-content/add-ons/youtube-black-bars-remover_4.0.0 directory
     
  2. Unzip version 4.0.1 so that you have a directory at tubepress-content/add-ons/youtube-black-bars-remover_4.0.1
     
  3. Supply ?tubepress_clear_system_cache=true to your website's URL once, e.g. http://mysite.com/?t...stem_cache=true. This will clear out TubePress's system cache so that it discovers the upgrade.

Please give it a try and let us know how it works!



#17 markphipps

markphipps

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 03 April 2015 - 06:32 AM

Hi Eric,

 

Thanks for the update.  The problem is I don't have this add-on installed.  The mixed-content bug is in the core code. 

 

Cheers,

Mark