HTTPS Issue – Google Fonts and Mystery Code in head

This topic has 17 replies, 3 voices, and was last updated 9 years, 11 months ago ago by Eva Kemp

  • Avatar: Hortongroup
    Horton
    Participant
    November 26, 2014 at 18:53

    Hi there-

    We just launched https://www.thechocolatebunnyboutique.com and noticed in Firefox that we’re getting mixed content error for SSL.

    I noticed this code in the head of site:

    <style type=’text/css’>
    @import url(http://fonts.googleapis.com/css?family=Open+Sans:400,800,300,700);@import url(http://fonts.googleapis.com/css?family=Lobster);@import url(http://fonts.googleapis.com/css?family=Dancing+Script);.subtitle_seagreen{font-size:22px; color:#647467;font-family:Lobster}.subtitle_seagreen2{font-size:24px; color:#647467;font-family:Dancing Script,Open Sans}.subtitle_yellow{font-size:22px; color:#ffc925;font-family:Lobster}.subtitle_white{font-size:22px; color:#fff;font-family:Lobster}.subtitle_white2{font-size:24px; color:#fff;font-family:Dancing Script,Open Sans}.subtitle_olive{font-size:22px; color:#8c8c71;font-family:Lobster}.title_olive{font-size:48px; color:#686726;font-family:Open Sans}.title_white{font-size:56px; color:#fff;font-family:Open Sans}.title_white2{font-size:56px; color:#fff; line-height:1; text-transform:uppercase;font-family:Georgia}.title_seagreen{font-size:48px; color:#647467;font-family:Open Sans}.title_seagreen2{font-size:60px; color:#647467; text-transform:uppercase;font-family:Georgia}.text_white{font-size:13px; color:#fff;font-family:Open Sans; text-align:center}
    </style>

    We don’t have those fonts set anywhere in any theme or plugin settings. We’ve used this theme before on other secure sites so didn’t think was theme but I can’t find where that code is coming from and if I google .title_seagreen2, the only other site that comes up also uses this theme.

    I noticed this comment at themeforest:
    jmprojeto PURCHASED 5 months ago

    hello where i can change the script calls the google fonts from http to https. I’m using a security certificate that is sending alerts errors.

    8theme AUTHOR 5 months ago

    Hello, jmprojeto,

    You may change that in this file: framework/theme-functions.php

    and this ticket in the support forum:
    https://www.8theme.com/topic/legenda-https-google-font/#post-24981

    We use a child theme so need to know best route since site is now live and how to do in child theme rather than editing parent.

    Thanks much-
    Jesica

    16 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    November 26, 2014 at 19:10

    Hello,

    You need create a folder “framework” with the file shortcodes.php in it.
    Add the lines 1614, 1618 from the parent file and edit the link from http//fonts.googleapis.com/css?family to //fonts.googleapis.com/css?family

    Refer to http://codex.wordpress.org/Child_Themes > paragraph “Referencing / Including Files in Your Child Theme”

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: Hortongroup
    Horton
    Participant
    November 26, 2014 at 22:55

    k, we’re off a hair, is throwing errors.

    tried
    <?php
    <link rel=’stylesheet’ href=’//fonts.googleapis.com/css?family=<?php echo $google_name; ?>’ type=’text/css’ media=’all’ />
    //wp_enqueue_style($google_name,”//fonts.googleapis.com/css?family=”.$google_name);

    ?>

    then tried JUST those lines

    <link rel=’stylesheet’ href=’//fonts.googleapis.com/css?family=<?php echo $google_name; ?>’ type=’text/css’ media=’all’ />
    //wp_enqueue_style($google_name,”//fonts.googleapis.com/css?family=”.$google_name);

    and the 2nd line appears at top of front end of site.

    thoughts?

    Avatar: Eva
    Eva Kemp
    Support staff
    November 27, 2014 at 12:58

    Hello,

    Please provide us with wp-admin panel and FTP credentials in Private Content.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: Hortongroup
    Horton
    Participant
    November 27, 2014 at 15:00

    Thank you. It’s a holiday weekend and everyone’s out til Monday so I can’t create ftp user but I did create a login.

    Files can be edited here, theme is Chocolate Bunny.
    https://www.thechocolatebunnyboutique.com/wp-admin/theme-editor.php

    You’ll see functions.php and shortcodes file which IS in framework folder in theme.
    [~/www/wp-content/themes/chocolate-bunny/framework]

    I am not currently calling shortcodes.php via functions.php so the site doesn’t blow up.

    Thanks again!

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    November 27, 2014 at 18:25

    Hello,

    Please remove the changes you made in the child theme concerning this issue and add this code in .htaccess file in the site directory:

    <IfModule mod_headers.c>
       Header set Access-Control-Allow-Origin "*"
    </IfModule>

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: Hortongroup
    Horton
    Participant
    December 1, 2014 at 13:32

    Hi there-

    I’ve added that now. Still seeing the same line in head of site ( <style type=’text/css’>
    @import url(http://fonts.googleapis.com/css?family…&#8230;. ) and still getting mixed content message in Firefox.

    Avatar: Eva
    Eva Kemp
    Support staff
    December 1, 2014 at 17:17

    Hello,

    I’m unable to view your site now.
    Have you removed SSL certificate?
    Please show a screenshot where exactly you see those errors.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: Hortongroup
    Horton
    Participant
    December 1, 2014 at 17:19

    we had to remove that as it totally broke the site in Firefox.

    Avatar: Eva
    Eva Kemp
    Support staff
    December 2, 2014 at 13:54

    Hello,

    Is there any assistance required from us?

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: Hortongroup
    Horton
    Participant
    December 2, 2014 at 16:20

    I think we’re good now. Had another dev at work help me track down. Ended up using https://wordpress.org/plugins/ssl-insecure-content-fixer/ b/c not everything would override via child theme. Somehow that plugin got it all… FF and IE both now not showing mixed content.

    Thanks!

    Avatar: Eva
    Eva Kemp
    Support staff
    December 2, 2014 at 19:20

    Hello,

    We’re glad you’ve found the solution.

    Have a nice day.

    Regards,
    Eva Kemp.

    Avatar: Qefx
    Qefx
    Participant
    December 28, 2014 at 19:33

    I have the same problem, I will try to addon. And hope it helps. But still, this issue should be fixed, there several insecure callings of URLs in the theme. Best would be to change to “//” or set an option in the setting like: Use SSL ?

    Avatar: Qefx
    Qefx
    Participant
    December 29, 2014 at 00:09

    Ok, tried this ssl plugin, it is working. Problem is: I use better minify, which won´t change the http to https ;( I can´t find for the sake of my life the file which creates this unsecure @import for the font.

    Where is it? In which PHP file or modul? (In IDStore theme) I really need it to change…

    Avatar: Eva
    Eva Kemp
    Support staff
    December 29, 2014 at 09:31

    Hello @Qefx,

    This line @import url(http://fonts.googleapis.com/css?family=Open+Sans); is placed in style.css file in the theme folder. Please check it.

    Regards,
    Eva Kemp.

    Avatar: Qefx
    Qefx
    Participant
    December 30, 2014 at 18:28

    Thank you! That drove me nuts!

    Happy new year!

    Avatar: Eva
    Eva Kemp
    Support staff
    December 30, 2014 at 18:57

    Hello @Qefx,

    You’re welcome.

    Happy New Year!

    Regards,
    Eva Kemp.

  • Viewing 17 results - 1 through 17 (of 17 total)

The issue related to '‘HTTPS Issue – Google Fonts and Mystery Code in head’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.