SSL site blocks older youtube embeds
I'm not seeing youtube embeds in older notes in either firefox or chrome:
two notes:
https://publiclab.org/notes/mathew/2-1-2013/american-kite-fishing-low-tech-kite-balloon-hybrid
and
https://publiclab.org/notes/mathew/2-1-2013/how-pauls-fishing-kites-flys-wind
Is this a known issue for YouTube? That would be a bummer. Also can you check if they work in non-SSL?
On Wed, Jun 25, 2014 at 5:56 PM, mathew lippincott <[email protected]
wrote:
I'm not seeing youtube embeds in older notes in either firefox or chrome: [image: screen shot 2014-06-25 at 2 55 54 pm] https://cloud.githubusercontent.com/assets/1203280/3392353/84087392-fcb3-11e3-9c78-3bd4e8d4cc30.png two notes:
https://publiclab.org/notes/mathew/2-1-2013/american-kite-fishing-low-tech-kite-balloon-hybrid and
https://publiclab.org/notes/mathew/2-1-2013/how-pauls-fishing-kites-flys-wind
— Reply to this email directly or view it on GitHub https://github.com/publiclab/plots2/issues/109.
It's probably the browser blocking mixed content. If you are using https but the YouTube link is http the browser will block the insecure content for your safety.
URLs should be :// and never http:// or https:// that way the secure stuff links to secure stuff and insecure stuff does likewise On Jun 25, 2014 5:57 PM, "mathew lippincott" [email protected] wrote:
I'm not seeing youtube embeds in older notes in either firefox or chrome: [image: screen shot 2014-06-25 at 2 55 54 pm] https://cloud.githubusercontent.com/assets/1203280/3392353/84087392-fcb3-11e3-9c78-3bd4e8d4cc30.png two notes:
https://publiclab.org/notes/mathew/2-1-2013/american-kite-fishing-low-tech-kite-balloon-hybrid and
https://publiclab.org/notes/mathew/2-1-2013/how-pauls-fishing-kites-flys-wind
— Reply to this email directly or view it on GitHub https://github.com/publiclab/plots2/issues/109.
You'd think browsers would show some kind of notification in-line that they're doing this... it's got to be a problem for them elsewhere. I don't know if there's much we can do about it except encourage people to use the new embed. Can we search the site for this issue?
On Wed, Jun 25, 2014 at 6:12 PM, Bryan Bonvallet [email protected] wrote:
It's probably the browser blocking mixed content. If you are using https but the YouTube link is http the browser will block the insecure content for your safety.
URLs should be :// and never http:// or https:// that way the secure stuff links to secure stuff and insecure stuff does likewise On Jun 25, 2014 5:57 PM, "mathew lippincott" [email protected] wrote:
I'm not seeing youtube embeds in older notes in either firefox or chrome: [image: screen shot 2014-06-25 at 2 55 54 pm] < https://cloud.githubusercontent.com/assets/1203280/3392353/84087392-fcb3-11e3-9c78-3bd4e8d4cc30.png>
two notes:
https://publiclab.org/notes/mathew/2-1-2013/american-kite-fishing-low-tech-kite-balloon-hybrid and
https://publiclab.org/notes/mathew/2-1-2013/how-pauls-fishing-kites-flys-wind
— Reply to this email directly or view it on GitHub https://github.com/publiclab/plots2/issues/109.
— Reply to this email directly or view it on GitHub https://github.com/publiclab/plots2/issues/109#issuecomment-47165819.
The browsers usually do show it, but it's something like a small icon in the upper left by the URL bar near the SSL icon. It'll have an X or a red slash or be colored differently, and you click on it, and it says "blocking mixed content." It's so subtle it is easily missed in most browsers. One or two might only mentioned it in the console.
It's easy to search through content for "http://" and "https://". Let's make sure that's the problem first.
Chrome shows a yellow triangle in the SSL padlock.
I can;t make the links work with "://" but if i change from http:// to https:// the content works.
try no colon. just // instead of http:// or https://.
On Wed, Jun 25, 2014 at 3:19 PM, mathew lippincott <[email protected]
wrote:
I can;t make the links work with "://" but if i change from http:// to https:// the content works.
— Reply to this email directly or view it on GitHub https://github.com/publiclab/plots2/issues/109#issuecomment-47166508.
Hmm. never seen that syntax before, interesting. Is it a problem for it just to be https if it doesn't otherwise work?
Either way, i think this is actually a content and Youtube issue... shall we close?
On Wed, Jun 25, 2014 at 6:20 PM, Bryan Bonvallet [email protected] wrote:
try no colon. just // instead of http:// or https://.
On Wed, Jun 25, 2014 at 3:19 PM, mathew lippincott < [email protected]
wrote:
I can;t make the links work with "://" but if i change from http:// to https:// the content works.
— Reply to this email directly or view it on GitHub https://github.com/publiclab/plots2/issues/109#issuecomment-47166508.
— Reply to this email directly or view it on GitHub https://github.com/publiclab/plots2/issues/109#issuecomment-47166570.
@jywarren It's a new syntax to me as well, but I know it works. It was recommended to me by a coworker who said "shut up I don't want to talk to you just do it it works." So I spent the time looking into W3C and stuff. It doesn't even have a name, but the specification for processing URLs is such that if the "scheme" is missing (http or https being example schemes), then browsers are advised to use the current scheme.
Thus viewing https://publiclab.org/thing with a resource link to //whatever.com will render the URL as https://whatever.com and viewing http://publiclab.org/thing with a resource link to //whatever.com will render the URL as http://whatever.com.
It's actually extraordinarily convenient because you never have to worry about mixed content errors again. You only have to worry that an external link lacks a secure source, but that's out of your hands anyway.
// syntax works! how do we make sure this works for embed links automatically?
caveats: http://www.mindtouch.com/blog/2014/03/10/schemeless-url-pitfalls/
If we switch to full https, it will be fine.
Although we're waiting for Dogi to give the okay, I don't see how it can add much more load. In my experience, supporting both has always caused more problems (like this one) than supporting one or the other.
btw this is what Chrome console says: "[blocked] The page at 'https://publiclab.org/notes/mathew/2-1-2013/american-kite-fishing-low-tech-kite-balloon-hybrid' was loaded over HTTPS, but ran insecure content from 'http://www.youtube.com/embed/TRomyZTkGAQ': this content should also be loaded over HTTPS."
Well, this is not due to running both -- it's due to our cert not being valid for i.publiclab.org, just www.publiclab.org and publiclab.org. And primarily it's due to YouTube's old embed code listing http instead of https (presumably defaulting to https would have been fine) so I think the solution is to find all the old embed codes and get people to change them.
On Wed, Jun 25, 2014 at 6:32 PM, Bryan Bonvallet [email protected] wrote:
btw this is what Chrome console says: "[blocked] The page at ' https://publiclab.org/notes/mathew/2-1-2013/american-kite-fishing-low-tech-kite-balloon-hybrid' was loaded over HTTPS, but ran insecure content from ' http://www.youtube.com/embed/TRomyZTkGAQ': this content should also be loaded over HTTPS."
— Reply to this email directly or view it on GitHub https://github.com/publiclab/plots2/issues/109#issuecomment-47167606.
we can't just find/replace? getting people to change them sounds like it won't happen
We should be able to find/replace in the database with rails console.
Additionally, the embed tool almost certainly writes "http://" explicitly, so we would want to change that to "//" to support both or "https://" if we want to go all in.
hard coded YouTube links which must be fixed in the HTML: https://github.com/publiclab/plots2/blob/master/app/views/editor/post.html.erb#L28 https://github.com/jywarren/plots2/blob/4894a52340880c987a60a3992a54c5d4cb87f9b9/app/views/home/_carousel.html.erb#L31 https://github.com/jywarren/plots2/blob/4894a52340880c987a60a3992a54c5d4cb87f9b9/app/views/home/home.html.erb#L36
it doesn't look like there is any kind of YouTube button or embed function, so people are dropping YouTube links in by hand, right? It might be worth putting a button in place or putting a commit hook that does find/replace on posts to reduce burden on users to ensure they use the correct scheme in their links.
well we can in the wiki, of course. But for research notes, don't you think we should ask permission or is this kind of fixing something we can do as admins? I guess that makes sense. Let's see how many there are first.
On Wed, Jun 25, 2014 at 6:43 PM, Bryan Bonvallet [email protected] wrote:
We should be able to find/replace in the database with rails console.
Additionally, the embed tool almost certainly writes "http://" explicitly, so we would want to change that to "//" to support both or "https://" if we want to go all in.
— Reply to this email directly or view it on GitHub https://github.com/publiclab/plots2/issues/109#issuecomment-47168543.
I think this falls under admin responsibilities. We'd be fixing something we broke, basically, not changing something they put in.
I more or less agree with @mathewlippincott . We're not changing the effective content.
Then again, people who like emotion more than reason might argue that indeed we are changing the content. The literal content. rabblerabblerabble. I mean I'm pretty content to say people who get upset about it don't understand, but then ... I think that's what the Nazis said? Again, emotional arguments.