Support » Plugin: Font Awesome » The Font Awesome plugin caught a fatal error – Error On Plugin Activation

  • A WP Life

    (@awordpresslife)


    Plugin displaying the fatal error on activation at localhost environment:

    Error:

    
    The Font Awesome plugin caught a fatal error.
    
    Your WordPress server failed trying to send a request to the Font Awesome API server.
    

    http://prntscr.com/sqzecs

    And our many users reported your plugin slowing site on a live environment.

    Will this plugin load resources from the Font Awesome server?

    Thanks

    • This topic was modified 2 months, 1 week ago by A WP Life.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author mlwilkerson

    (@mlwilkerson)

    Hello, the plugin is capable of running in localhost–that’s how I do all of my development. However, it must be able to reach the Font Awesome API server at https://api.fontawesome.com (there is no way for you to run that locally). If it can’t successfully reach the API server, it will show that error message that you saw.

    As for loading resources from the Font Awesome server, there are two different ways that things are being loaded from Font Awesome servers:

    (1) The plugin loads metadata from api.fontawesome.com. This is only for configuring the plugin, though, so it would only be loaded when an admin user is using the settings page. And even then, there is some caching involved to optimize these loads. The plugin does not have to make requests to the Font Awesome API server on normal page loads. It’s the plugin’s back end (PHP) code running on your WordPress server that makes a request to the Font Awesome API server.

    (2) The plugin adds <script> or <link> tags to your page templates, depending on how you’ve configured it. Those tags will load resources from one of the Font Awesome CDNs, depending on whether you’ve configured the plugin to load Free or Pro, and whether you’re using Kits. It’s the browser (not the plugin) loading a given page that loads the resources from the CDN. And because of caching optimizations here as well, those requests will often just re-use the browser’s local cache instead of making new network requests for assets.

    As for the slow experience you’ve mentioned, I would need more information about what behavior is happening more slowly than might be expected. On the server? In the browser? On front-end page loads? Or admin settings page loads?

    A WP Life

    (@awordpresslife)

    Hey @mlwilkerson,

    Thanks for real quick support.

    I found the error the The Font Awesome plugin caught a fatal error. appeared some times only.
    Not the all-time. Maybe this due to server to client communication response.

    One more thing we facing in our plugin development(while load FA locally).

    While we use FA version 4.7 or Old Version it worked perfect with themes that are using FA old version or same version.
    And If we use the FA 4.7+ version with themes that are using old version of FA then the icon gets conflict and didn’t display.

    The case is Plugin loading the New FA library and Theme using the Old FA library.

    That’s didn’t also help us: https://fontawesome.com/how-to-use/on-the-desktop/setup/upgrading-from-version-4

    Thanks

    Plugin Author mlwilkerson

    (@mlwilkerson)

    If I understand your second concern correctly, you’re having a problem with FA version 4 compatibility with other themes or plugins.

    Have you run the conflict detection scanner? That would be the first thing to do. If those other themes or plugins are loading a conflicting version of FA (often 4.7), then it will be hard to make everything work consistently. So the first priority is to try and block them from loading conflicts.

    You can run the conflict detection scanner and block the conflicts it finds from the Troubleshoot tab of this plugin’s admin settings page, if you’re using a recent version of this plugin.

    Once those conflicts are blocked, you can then enable “Version 4 Compatibility,” which will normally succeed in making those other themes work. If you’ve selected “Use CDN”, that version 4 compatibility is there on the settings tab on the plugin’s settings page. If you’ve selected “Use a Kit”, then you have to enable version 4 compatibility on that specific kit from your fontawesome.com account.

    In any case, if you’re running in a local environment (i.e. localhost) you still have to be connected to internet, both for plugin’s server-side code to work (the calls to api.fontawesome.com for metadata), and for the web browser client to work (the browser requests to load the icon assets from the appropriate CDN).

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.