-
AuthorPosts
-
April 5, 2015 at 3:00 am #423549
Can anyone please help me?
Fontello icons failing in https://
I found this which appears to be related but it didnt work
https://kriesi.at/support/topic/fontello-in-admin/Easiest way to reproduce my bug is this:
1) Go incognito in Chrome
2) load https://gradle.org (please use https:// not http://)You will see the Font Icons are not loading.
If you View Source you will see this block of code:
<style type=’text/css’>@font-face{font-family:’entypo-fontello’;font-weight:normal;font-style:normal;src:url(‘http://gradle.org/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/fonts/entypo-fontello.eot?v=3’);src:url(‘http://gradle.org/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/fonts/entypo-fontello.eot?v=3#iefix’) format(’embedded-opentype’),url(‘http://gradle.org/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/fonts/entypo-fontello.woff?v=3’) format(‘woff’),url(‘http://gradle.org/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/fonts/entypo-fontello.ttf?v=3’) format(‘truetype’),url(‘http://gradle.org/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/fonts/entypo-fontello.svg?v=3#entypo-fontello’) format(‘svg’);}#top .avia-font-entypo-fontello,body .avia-font-entypo-fontello,html body [data-av_iconfont=’entypo-fontello’]:before{font-family:’entypo-fontello’;}</style>
You can see that all the fonts are being called as http, NOT https
So OF COURSE they won’t load. So I do understand the problem, but I can’t figure out how to get this theme to output this code as https so it will work on Firefox or Chrome.
Thank you Very Much.
Miko- This topic was modified 9 years, 7 months ago by mikogradle.
April 5, 2015 at 9:37 am #423584April 5, 2015 at 6:33 pm #423688double bump
- This reply was modified 9 years, 7 months ago by mikogradle.
April 6, 2015 at 4:54 pm #424010Hi!
Please refer to this post – http://kriesi.at/documentation/enfold/enable-cors/
Best regards,
YigitApril 6, 2015 at 7:48 pm #424186Ok I will try this and let you know.
April 6, 2015 at 10:28 pm #424286i installed it to .htaccess
to see it go “Incognito” in Chrome
Then load
https://gradle.orgit still doesnt work… same issue as “Icons not showing in Chrome”
https://kriesi.at/support/topic/icons-not-showing-in-chrome-2/Icons in chrome show up as blank squares on https://
April 7, 2015 at 4:58 am #424418Your suggestion didnt work
Your theme output http URLs to get the fontello fonts. Need the theme to output https:// URLs
Miko
April 7, 2015 at 8:22 am #424501Hi!
Try to install this plugin to force https: http://shop.webaware.com.au/downloads/ssl-insecure-content-fixer
If it doesn’t work, edit config-templatebuilder > avia-template-builder > php > font-manager-class.php, look for this code:
$fstring = $font_list['folder'].'/'.$font_name;
Replace it with:
$folder = is_ssl() ? str_replace('http', 'https', $font_list['folder']) : $font_list['folder']; $fstring = $folder.'/'.$font_name;
Cheers!
IsmaelApril 7, 2015 at 8:25 am #424505thank you for your suggestion. as it happens I have already installed that plugin. it did not work.
April 7, 2015 at 8:28 am #424508April 7, 2015 at 8:38 am #424511this smells really really close the the true answer… thanks for having a close look.
sadly, when i do view source on incognito mode in chrome, it still shows http urls and the fontello icons show as squares.
April 7, 2015 at 3:57 pm #424763this still doesnt work. is_ssl is detected by the plugin so that part is fine.
April 7, 2015 at 4:30 pm #424793I would be happy to pay for a solution… right now I am getting a lot of site traffic that is looking at a broken site.
April 7, 2015 at 9:02 pm #424943April 8, 2015 at 12:44 am #425016I have the same issue!!
April 8, 2015 at 2:28 am #425025If I solve it I will help you Odtene!
April 8, 2015 at 3:40 am #425050I found it
It’s here in font-manager.class.php
path is
/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/phpThe fix is this single line which you add to the function below
$fstring = str_replace(‘http:’, ”, $fstring);static function load_font($element)
{
$font_configs = self::load_iconfont_list();$output = “”;
if(!empty($font_configs))
{
$output .=”<style type=’text/css’>”;
foreach($font_configs as $font_name => $font_list)
{
$append = empty($font_list[‘append’]) ? “” : $font_list[‘append’];
$qmark = empty($append) ? “?” : $append;$fstring = $font_list[‘folder’].’/’.$font_name;
$fstring = str_replace(‘http:’, ”, $fstring);
$output .=”
@font-face {font-family: ‘{$font_name}’; font-weight: normal; font-style: normal;
src: url(‘{$fstring}.eot{$append}’);
src: url(‘{$fstring}.eot{$qmark}#iefix’) format(’embedded-opentype’),
url(‘{$fstring}.woff{$append}’) format(‘woff’),
url(‘{$fstring}.ttf{$append}’) format(‘truetype’),
url(‘{$fstring}.svg{$append}#{$font_name}’) format(‘svg’);
} #top .avia-font-{$font_name}, body .avia-font-{$font_name}, html body [data-av_iconfont='{$font_name}’]:before{ font-family: ‘{$font_name}’; }
“;
}$output .=”</style>”;
}
return $output;
}April 8, 2015 at 6:36 am #425084This is a bit of a hack, but if you can bake the scalable solution into the next release it would be great. If I update it may blow away this patch.
April 9, 2015 at 5:55 pm #426110Hi!
thanks a lot for sharing your solution! Please feel free to make a feature request here: kriesi.at/support/enfold-feature-requests/
Cheers!
AndyApril 9, 2015 at 8:52 pm #426187unfortunately it doesn’t work for me. :X I keep wondering why.. I’m using siteground and cloud flare ssl
there are any other users here that having this problem?
- This reply was modified 9 years, 7 months ago by odtene.
April 10, 2015 at 8:02 am #426401Hey!
Are you using some kind of caching that might be causing you to not see recent changes?
Best regards,
RikardMay 5, 2015 at 9:16 pm #440005Hey guys!
I get a syntax error when adding this line..
Am I doing anything wrong?
Thanx!
May 7, 2015 at 9:20 am #440834Hi!
Which code did you add? Did you try the solution provided here: https://kriesi.at/support/topic/fontello-icon-fonts-failing-in-ssl-https/#post-424501
Cheers!
IsmaelMay 7, 2015 at 10:55 am #440873Hi Ismael, thanx for the reply..
I installed the plugin mentioned above and the fontello icons are back in it’s place..
However, since installing the SSL certificate, i can’ upload fonts anymore when using the “use any font” plugin..
Any suggestions there?
Thanx!
May 9, 2015 at 6:04 am #441882Hi!
I’m sorry but we don’t provide support for third party plugins. Please contact the plugin author regarding this issue.
Cheers!
IsmaelJune 22, 2015 at 1:26 pm #462731Hi Guys,
Fontello fonts are showing as empty squares after migrating the files from a server directory to the main directory in the same server, it is not a https site (simple http) I have tried some fixings described in another posts without success, I’m trying to apply the solution above but I’m getting sintax errors when I replace the code existent /wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php by this one belowstatic function load_font($element)
{
$font_configs = self::load_iconfont_list();$output = “”;
if(!empty($font_configs))
{
$output .=”<style type=’text/css’>”;
foreach($font_configs as $font_name => $font_list)
{
$append = empty($font_list[‘append’]) ? “” : $font_list[‘append’];
$qmark = empty($append) ? “?” : $append;$fstring = $font_list[‘folder’].’/’.$font_name;
$fstring = str_replace(‘http:’, ”, $fstring);
$output .=”
@font-face {font-family: ‘{$font_name}’; font-weight: normal; font-style: normal;
src: url(‘{$fstring}.eot{$append}’);
src: url(‘{$fstring}.eot{$qmark}#iefix’) format(‘embedded-opentype’),
url(‘{$fstring}.woff{$append}’) format(‘woff’),
url(‘{$fstring}.ttf{$append}’) format(‘truetype’),
url(‘{$fstring}.svg{$append}#{$font_name}’) format(‘svg’);
} #top .avia-font-{$font_name}, body .avia-font-{$font_name}, html body [data-av_iconfont='{$font_name}’]:before{ font-family: ‘{$font_name}’; }
“;
}$output .=”</style>”;
}
return $output;
}Also have found another post where an user seems to be able to fix the code above, here is his description how he fixed:
“Adding the line $fstring = str_replace(‘http:’,”, $fstring); to the font-manager.class.php seems to have worked for me also. Although a copy paste of Mikogradles code may cause some users issues as the unicoding doesn’t seem to match up and so some characters change to ? rather than the indented quote marks. Also the ” between the commas above is 2 single quotes rather than a double quote.”
Have tried to apply it to fix the php file without success, there is any chance for you guys to help to get the correct code I can copy and replace in font-manager.class.php, I really would appreciate your help guys
many thanks
June 24, 2015 at 9:40 am #463837Hey!
@chanleo
Please open a new ticket for your issue, as this thread gets too long and that’s why too confusing for us and other readers searching for solutions.
Include a link to your website showing the issue. Admin access would be helpful as well (post login details as private reply).
Make sure to use newest theme and WordPress version and try to deactivate all plugin, to see if things get better.Make sure to use the HTML-code instead of unicode-number: http://unicode-table.com/
Regards,
Andy -
AuthorPosts
- The topic ‘Fontello Icon Fonts Failing in SSL HTTPS’ is closed to new replies.