Page 1 of 1

(FIX) Using Google fonts on secure/mixed content website

Posted: 20 Sep 2014, 23:02
by pjbauer
If you are running a secure website with all or some pages using the https: protocol, the Phoca Google web fonts will not be downloaded for pages using the https: protocol (at least not in Firefox - haven't tried other browsers).

Here's a link from mozilla explaining the problem... https://developer.mozilla.org/en-US/doc ... ed_content

The php code should be fixed so as to allow the browser to decide what protocol to use when accessing the Google website.

To fix this, change line 168 of /plugins/system/phocafont/phocafont.php from...

Code: Select all

$cssOutput = ' <link href="http://fonts.googleapis.com/css?family='.str_replace(' ', '+', $fontData->title). $variant . $subset .'"'
to...

Code: Select all

$cssOutput = ' <link href="//fonts.googleapis.com/css?family='.str_replace(' ', '+', $fontData->title). $variant . $subset .'"'
This solves that problem. 8)

Re: (FIX) Using Google fonts on secure/mixed content website

Posted: 21 Sep 2014, 16:18
by Jan
Hi, thank you very much for this info, so this seems to solve the problems in Firefox but does it somehow influence other browsers like Chrome or Opera or non standard browsers?

Jan