• I have been looking for a solution to the following problem for a while now and I can’t figure it out.

    GTmetrix’s performance report tells me:

    The following requests are returning 404/410 responses. Either fix the broken links, or remove the references to the non-existent resources.
    https://fonts.googleapis.com/fonts/ElegantIcons.ttf
    https://fonts.googleapis.com/fonts/ElegantIcons.woff

    Clicking on either of the links does in fact cause a 404-error.

    I can’t figure out what part of my website is asking for these Google Fonts. Is it my template (Foreverwood child)? One of my plugins?

    The only place I found a reference to Google Fonts was in my functions.php:

    $foreverwood_font_url = add_query_arg( 'family', 'PT+Sans', "//fonts.googleapis.com/css" );

    and

    wp_enqueue_style( 'foreverwood-google-font-default', '//fonts.googleapis.com/css?family=PT+Sans&subset=latin,latin-ext' );

    I installed the plugin Remove Google Fonts References, but that didn’t help.

    The site itself (https://google-deskundige.nl) seems to be working fine, but the error is bothering me simply because I hate not knowing what’s causing it :S

    Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • mrijkeboer,

    Do you have any icon plugins installed?

    You will find Google Font references for PT Sans as that is the font your website is using, that shouldn’t be causing the issue.

    Your website is actually giving the following error:

    Font from origin ‘https://fonts.googleapis.com’ has been blocked from loading by Cross-Origin Resource Sharing policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘https://google-deskundige.nl’ is therefore not allowed access. The response had HTTP status code 404.

    I found it using Chromes Inspect Element tool. There is a mention of that particular error here and here. If you cannot find what is referencing the fonts, it may be worth seeing what the suggested fix for the error is.

    Grant.

    Thread Starter mrijkeboer

    (@mrijkeboer)

    Hello Grant,

    No, I don’t have any icon plugins installed. That is, not intentionally ?? I looked again at the plugins I installed, but none on them seem even remotely icon-related.

    Re: the error message from Inspect Element, I see what you mean. I hadn’t noticed that yet, thanks! I’ll take look at the pages you mentioned to see if maybe there is something there that might help me. If nothing else this is a new avenue to pursue.

    Mar

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Google Fonts causing 404 error’ is closed to new replies.