[Hummingbird] Fontawesome icons dissapear when I turn on the Hummingbird CDN

Hi,
What do I have to do to keep Fontawesome icons on my website and use Hummingbird CDN?
Thanks.

  • Adam Czajczyk
    • Support Gorilla

    Hello Robert

    I hope you're well today and thank you for your question!

    I checked the site and I see that you're using Upfront Issue theme but the Font Awesome CSS loading seems to be customized.

    The issue with Hummingbird CDN happens because Font Awesome CSS is loading fonts from local paths. However, the CSS itself is loaded from external CDN and while it's then pushed to our CDN, those local paths start to point to.... our CDN where the font files are absent.

    The problem is that while the Asset Optimization attempts to fix that during optimization process, it apparently can't do it in this case.

    I noticed that there's a my-font-awesome-styles.php must-use plugin active on the site. I assume this is related but since I can't see the source code of it, I can't tell that for sure. Can you tell me please what exactly this plugin is doing or share it's source code with me? I believe this probably is the "key" to the case.

    Best regards,
    Adam

  • Robert
    • Site Builder, Child of Zeus

    Hi Adam,
    I am not aware that I'd have any plugin for FontAwesome.
    I checked my-font-awesome-styles.php and its content is:

    <?php
    function my_font_awesome_styles() {
    	wp_enqueue_style( 'my-font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', false );
    }
    add_action( 'wp_enqueue_scripts', 'my_font_awesome_styles' );

    Thank you.

  • Adam Czajczyk
    • Support Gorilla

    Hello Robert

    Thanks for response.

    No, Ultimate Branding doesn't install that and I admit I'm not sure why Loco Translate recognizes is as being in Ultimate Branding text domain.

    However, the piece of code seems to be important here as it actually cases FontAwesome css style to be loaded from a remote CDN.

    The Upfront already contains FontAwesome css stylefile so that shouldn't be necessary so let's try to deal with it :slight_smile: Please first download the my-font-awesome-styles.php file to your local drive to keep its backup (just in case) and then remove it from /wp-content/mu-plugins folder.

    After that, clear all caches on site and re-check Asset Optimization (files must be checked again and re-created). See if the FA icons are still there without WPMU DEV CDN enabled and if so, enable it and check again.

    If that still doesn't help, we'll try another solution.

    Best regards,
    Adam

  • Robert
    • Site Builder, Child of Zeus

    I did the following:
    - backuped the file
    - deleted it
    - cleared cache in Hummingbird
    - re-checked Asset Optimization
    - checked if Icons are still there and...
    ... they were not. :slight_frown:
    Therefore I put the file back.

  • Adam Czajczyk
    • Support Gorilla

    Hi Robert,

    Thanks for response but I actually hoped that if that doesn't help, you just let me know before returning the file to its location so I could check the site again. My fault, I should have been more specific, sorry about that.

    Anyway, I think this is still related to that file or, rather, to the fonts css being fetched from outside as even if there's a need (and there is a chance that there might be) to manually adjusts paths of font files inside the CSS, it's impossible to do with a remotely stored file.

    If you don't mind, I'd like to give it a shot myself. For this, however, I would need a direct access to the site so that'd mean an admin level account and either FTP or cPanel access. Would that be possible? If so, please provide me with these credentials and I believe I'll be able to sort that out.

    Note: Don't leave your login details in this ticket.
    Instead, you can send us your details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below:

    Subject: "Attn: Adam Czajczyk"
    - Site login URL
    - WordPress admin username
    - WordPress admin password
    - FTP credentials (host/username/password)
    - cPanel credentials (host/username/password)
    - Folder path to site in question
    - Link back to this thread for reference
    - Any other relevant urls/info

    Best regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hi Robert

    Thanks, I just checked and can see what's happening. Now, that I got full access credentials to the site, you might (actually, please do) bring back that file (no need to letting me know, I'll see it's there).

    I'll use the credentials that you provided me with and see what I can do to fix that. I'll get back to you via e-mail directly, letting you know what I found and did.

    Best regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hi Robert

    Yes, I did recreate the file, indeed, though just today after you posted here, so I'm not quite sure why you were seeing it there. However, I did some checks and added a modification to the site and it seems to be working fine now with WPMU DEV CDN enabled in Hummingbird.

    I have also responded directly to your e-mail with more detailed description of the changes that I made so please take a look at your inbox (if everything's fine, there's no need to respond to my mail, just confirm here please).

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.