Support » Plugin: Advanced Custom Fields: Font Awesome Field » Bug / Unable to use

  • Installed, created a field.
    In backend no icons shown.
    In Error Console this:

    https://use.fontawesome.com/releases/v/css/all.css?ver=5.1.1

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <Error>
    <Code>AccessDenied</Code>
    <Message>Access Denied</Message>
    <RequestId>F25C958B29E095DD</RequestId>
    <HostId>
    6tQx5tKGzRUC/ibJsl9S6LuJaLuuHSDVR7q4mevUq9kqwXtNn/JiHr+g2faP7H1WQzyxRyMyXtE=
    </HostId>
    </Error>

    Please fix this!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Solution for me:

    private $free_cdn_baseurl = 'https://use.fontawesome.com/releases/v5.8.1/';

    Plugin Author Matt Keys

    (@mattkeys)

    Hello mlfactory,

    I am glad you were able to find a workaround for the issue you are seeing. Although I would recommend that you not make this change directly to the plugin files as it will be overwritten on future plugin updates.

    Instead there are filters you can use to change these values. For instance you could use the ‘ACFFA_get_fa_url’ filter to set the URL used to retrieve the fonts. I put an example below of how this filter could be used in your theme functions.php

    function my_cdn_url_override( $cdn_url ) {
    	$cdn_url ='https://use.fontawesome.com/releases/v5.8.1/css/all.css';
    
    	return $cdn_url;
    }
    add_filter( 'ACFFA_get_fa_url', 'my_cdn_url_override', 10, 1 );

    Now to address the ‘root’ problem you are experiencing that is causing you to need this workaround to begin with. I see from your error console that the plugin is failing to get the latest version number and that is causing the issue you are seeing.

    The plugin uses the wp_remote_get() function to call out to this API endpoint to get the latest version number: https://data.jsdelivr.com/v1/package/resolve/gh/mattkeys/FontAwesome-Free-Manifest@5. Later this same function is used to call a similar endpoint to get a manifest of all fonts.

    It seems to me that these calls are not succeeding for some reason in your environment. I’ve checked all the endpoints today and they all seem to be online/working as expected, so I think this may be an isolated issue. I’ve seen issues before with some environments that have an outdated version of cURL installed. If you are still having issues, can you check which version of cURL is installed on your server?

    • This reply was modified 7 months, 2 weeks ago by Matt Keys.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug / Unable to use’ is closed to new replies.