Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author mlwilkerson

    (@mlwilkerson)

    Hi @davidblood,

    The JavaScript console (aka “web console) might have some additional diagnostic information in it. Could you check that for any additional clues?

    One problem that sometimes results in this error is when your WordPress web server does not allow PUT requests, or does not allow PUT requests to be sent to the plugin’s server-side code (i.e., a REST API route). In those cases, the problem can be resolved by changing your web server configuration to allow PUT requests. If you’re using a hosting provider, that might require coordinating with them.

    One way to troubleshoot whether your WordPress server is allowing PUT requests is to fiddle with the plugin settings on the “Use CDN” tab. For example, if its default configuration is to use Free Webfont, try changing it to SVG and saving. If that succeeds, then it means that your web server is allowing PUT requests as required. If that fails, then it’s even more likely that disallowed PUT requests is the source of the problem.

    > is it because i’m using v6 and the plugin only supports 5.15.4 (latest)?

    While it’s true that on the Use CDN tab, the latest available to select is the latest v5, the plugin does support v6 kits. So I expect that your v6 kit will work just fine once it’s set up.

    Thread Starter davidblood

    (@davidblood)

    Hi @mlwilkerson,

    I was able to save SVG on the use CDN tab without issue – only having issue with Kits.

    The “Use A Kit` seems to log:

    POST /wp-json/font-awesome/v1/api 404
    Font Awesome WordPress Plugin Error Report
    WARNING: The last response from your WordPress server did not include the confirmation header that should be in all valid Font Awesome responses. This is a clue that some code from another theme or plugin is acting badly and causing the wrong headers to be sent.

    ‘Failed to fetch kits’

    In the DevTools console.

    While it’s true that on the Use CDN tab, the latest available to select is the latest v5, the plugin does support v6 kits. So I expect that your v6 kit will work just fine once it’s set up.

    Gotcha! Ideally I wanna use v6 free due to some of the icons I need.

    Plugin Author mlwilkerson

    (@mlwilkerson)

    Well, that console message shows a couple of big clues.

    1. It’s not the PUT request that saves the API Token that is failing, after all. It looks like it’s actually the subsequent POST request that queries your kits after saving your API Token that is failing.

    So I’m guessing that you see the green check mark next to your API Token, like it succeeded in saving the token, right? Even though it then subsequently fails?

    You could troubleshoot to make sure that POST requests are also working correctly on the plugin’s REST API routes. Another place this happens is when the plugin does the “preference check” when you switch configuration options on the “Use CDN” tab. Before saving, just when you click around to select different configuration options, you’ll see it spin and then report whether saving those configuration changes would result in some conflict. That preference check request, that happens before you click to save the changes, uses POST. So if you wanted to make sure your web server was handling POST requests correctly, you could inspect that the preference check request is succeeding.

    2. The WARNING might indicate that there’s some other code–plugin or theme–running on your WordPress site that is undermining the Font Awesome plugin’s functioning. I’ve seen that happen when other plugins emit output that they shouldn’t during the process of a REST API request/response. It’s why I added that whole diagnostic there that this WARNING is talking about.

    If you want to look into what that might be, you could inspect that request in the Network tab of the JavaScript/web/dev console. Look at the contents of the response. In the cases like this that I’ve seen before, there’s been something in that output that provides a clue as to what other plugin is undermining the REST request/response.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Saving Font Awesome (Kit API Token)’ is closed to new replies.