Support » Plugin: Advanced Custom Fields: Font Awesome Field » Better Font Awesome API Error

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Matt Keys

    (@mattkeys)

    Are you still experiencing this error? It looks like the API is operational, but perhaps they were experiencing some downtime earlier?

    Yes error is still showing…
    As I Deactivate plugin “Advanced Custom Fields: Font Awesome” no error on my screen

    Below ERROR Line

    “Don’t worry! Better Font Awesome will still render using the included fallback version: 4.3.0”

    this Line show below the ERROR line, I don’t know how to solve this…
    This error is showing on every admin page
    please help

    Plugin Author Matt Keys

    (@mattkeys)

    prashant623,

    I haven’t been able to reproduce the error that you are seeing. It is possible that the error only occurs when you are using my plugin along with another plugin. Can you do some diagnosis work to see if disabling other plugins makes the error go away?

    And if so, can you isolate which plugin it conflicts with?

    Thanks mattkeys for your support,
    Problem is now solve, its works fine with
    WordPress – Version 4.4.2
    Advanced Custom Fields – Version 4.4.5
    Max Mega Menu – Version 2.0.1
    WooCommerce – Version 2.5.2
    Error is solved, By I re-install WordPress and install above plugins
    Thanks Again Sir…

    Plugin Author Matt Keys

    (@mattkeys)

    wonderful, thanks for writing back to let me know.

    Hi mattkeys, I’ve got a similar problem on our server but not on my local xampp install.

    Using WordPress 4.5.3
    ACF PRO 5.4.0
    Advanced Custom Fields: Font Awesome 1.7.2

    I think it has to do with the server blocking the API and CDN URLs.

    Is it possible to just use the fallback font-awesome without trying to connect to those URLs and get the latest font-awesome library?

    Having this plugin active with this error slows down the admin pages to 30sec – 1 minute per page load.

    I have tried the following filer add_filter( 'bfa_force_fallback', '__return_true' ); but it only removes the Remote CSS Error, not the API Error

    Please see complete Error:

    Better Font Awesome
    API Error
    The attempt to reach the jsDelivr API server failed with the following error: http_request_failed: Connection timed out after 10161 milliseconds (URL: http://api.jsdelivr.com/v1/jsdelivr/libraries/fontawesome/?fields=versions,lastversion)
    Remote CSS Error
    The attempt to fetch the remote Font Awesome stylesheet failed with the following error: http_request_failed: Connection timed out after 10161 milliseconds (URL: //cdn.jsdelivr.net/fontawesome/4.3.0/css/font-awesome.min.css)
    The embedded fallback Font Awesome will be used instead (version: 4.3.0).
    Don’t worry! Better Font Awesome will still render using the included fallback version: 4.3.0
    Solution
    This may be the result of a temporary server or connectivity issue which will resolve shortly. However if the problem persists please file a support ticket on the plugin forum, citing the errors listed above.

    Plugin Author Matt Keys

    (@mattkeys)

    Looking in /better-font-awesome-library/lib/better-font-awesome-library.php, line 623, you will see a function called get_css().

    It looks like this function tries reaching out to the remote server before checking if the bfa_force_fallback filter is set. This should probably be refactored so that the remote server never gets queried if force_fallback is true.

    Perhaps something like this would work: https://gist.github.com/mattkeys/13e004734c1ed292f6d9f4883e79f0f0

    I am pretty swamped with work right now so I haven’t been able to test it out myself but that *looks* right to me.

    Thanks a lot Matt, I appreciate you taking time from your busy day, our server person temporarily whitelisted the IP and I am not able to test your new code on that server. However will try the new code and see what it does on my local install.
    I think the issue is more with stopping the API fetch. As the add_filter( 'bfa_force_fallback', '__return_true' ); already stops the latest CSS from loading.

    Hi Matt, Our temporary ip solution stopped working and I was able to test your code. Unfortunately it didn’t stop the issue as it was the API fetch causing the admin to time out and come to a crawling speed.

    I made a modification to /better-font-awesome-library/lib/better-font-awesome-library.php line 442 and it stopped the error by using the bfa_force_fallback filter. The admin is fast again. Thanks for pointing me in the right direction.

    private function setup_api_data() {
    	$force_fallback = apply_filters( 'bfa_force_fallback', false );
    	// Log the CSS fetch error.
    	if ( ! $force_fallback ) {
    		$this->api_data = $this->fetch_api_data( self::JSDELIVR_API_URL );
    	}
    }

    I leave this code with you and hopefully you can modify the plugin or make my modification better.

    Regards

    Plugin Author Matt Keys

    (@mattkeys)

    That library is actually developed and maintained by Mickey Kay, I just use his library in my plugin. This should really get fixed in that source, then I should use his updated library. Would you mind submitting this to him? https://wordpress.org/plugins/better-font-awesome/

    Sure will. Thanks =)

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Better Font Awesome API Error’ is closed to new replies.