• Resolved RL86

    (@rlijkendijk86)


    Hi,

    I just updated to 5.1 and now my page view statistics showing me a lot of 404 errors trying to lookup this:

    /wp-content/plugins/jetpack/css/”https:/fonts.googleapis.com/css?family=Open Sans”

    Shows up when visitors are viewing various pages of the website.

    Is there some kind of bug introduced with 5.1? While browsing the page nothing weird shows up when viewing the site, it is just my page views in the backend that is getting messed up.

    Can you please resolve this?

Viewing 15 replies - 16 through 30 (of 31 total)
  • @jeroenvdw I followed lazylonewolf’s advice and purged Cloudflade cache, and your fix is working now. Thanks man! I’m now seeing tons of same 404 errors through the Autoptimize plugin CSS, even though it’s disabled haha, but that’s a topic for a different forum.

    I’m now seeing tons of same 404 errors through the Autoptimize plugin CSS, even though it’s disabled haha, but that’s a topic for a different forum.

    that’s typically because Google uses cached version of HTML (pages) to request linked JS/ CSS. not sure why I’m afraid.

    frank (ao dev)

    @font-face{font-family:”Open Sans”;src:url(‘”https://fonts.googleapis.com/css?family=Open+Sans”‘)}

    The bug is caused by the single quotes and the double quotes being used. If you remove the ‘ single quotes at the beginning and end it works fine.

    @ninjamonk can you confirm this?
    Has anyone tried this effective solution?

    Same here on my site.

    Any word if this is getting fixed and planned for next release?

    I noticed it on one of the sites I maintain and another one is free from the error! They both have the same JP 5.1. Something else is involved somehow.

    Plugin Contributor csonnek

    (@csonnek)

    Happiness Rocketeer ??

    Everyone:

    Thank you for your reports! We’re tracking this issue in our GitHub repo right now – you can follow along with our progress here:
    https://github.com/Automattic/jetpack/issues/7435

    In the meantime, until we get this patched in a future Jetpack update, you can do the following:

    1) Remove the line from the file wp-content/plugins/jetpack/css/jetpack.css

    @font-face{font-family:”Open Sans”;src:url(‘”https://fonts.googleapis.com/css?family=Open+Sans”‘)}

    2) Add a line in your header.php file (in the <head></head> section):

    <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">

    That should take care of this error until we get this fixed in a future update.

    I hope that helps in the meantime!

    • This reply was modified 7 years, 4 months ago by csonnek.
    • This reply was modified 7 years, 4 months ago by csonnek.

    Hi ..
    No need to touch header.php
    I try this..

    # Open jetpack.css with FTP or your Host File Editor
    // wp-content/plugins/jetpack/css/jetpack.css //

    find :
    ("https://fonts.googleapis.com/css?family=Open+Sans");
    replace with :
    (https://fonts.googleapis.com/css?family=Open+Sans);

    • This reply was modified 7 years, 4 months ago by ydrch. Reason: Add directory to edit

    Thanks @ydrch – that should work too.

    Hi @jeroenvdw

    You say:

    And add a line in your header (in the <head></head> section) saying
    <link href=”https://fonts.googleapis.com/css?family=Open+Sans&#8221; rel=”stylesheet”>

    What file is that in?

    *** UPDATE: Scratch that – found it! ***

    • This reply was modified 7 years, 4 months ago by bobt333.

    FYI, on sites using Open Sans (ex with the TwentyTwelve theme), this also causes a delay in rendering the site text, as the browser tries to load the broken URL first before falling back to the URL specified in the theme stylesheet. Applying the fix takes care of the invisible text problem as well.

    I don’t care nearly as much about the extra 404 as I do about my text being visible immediately instead of after a several second delay.

    Yes, for any sites using OpenSans, browsers will wait for the 404 to time out before rendering any Open Sans text on the page. This adds several seconds to the load time of those websites. Troubleshooting the load time issue is what led me to notice the Jetpack issue.

    @jeroenvdw

    Sorry wrong person!

    • This reply was modified 7 years, 4 months ago by gamorganwp2.

    @ydrch

    You are indeed correct, thanks:)
    ——————
    # Open jetpack.css with FTP or your Host File Editor
    // wp-content/plugins/jetpack/css/jetpack.css //

    find :
    (“https://fonts.googleapis.com/css?family=Open+Sans&#8221;);
    replace with :
    (https://fonts.googleapis.com/css?family=Open+Sans);

    Only I had three ”’ at either end of the URL, I changed it to ”….

    • This reply was modified 7 years, 4 months ago by gamorganwp2.

    Hello all!

    To solve this and prevent from using Open Sans at all, of which loading was removed from WordPress Core a while back as well, I simply removed the @font-face rule for Open Sans Google font from jetpack.css altogether.
    I also replaced any Open Sans font-family calls at 5 further spots in jetpack.css and replace “Open Sans” with Helvetica.
    There is a fall-back in each of those css rules to default sans serif installed on user’s system. So if Helvetica is not existing, jetpack.css will pick a default browser font that is sans-serif.

    Best solution imo.

    Saskia

    This issue was patched up in a recent release of Jetpack. Please update to the latest version of Jetpack to get this patch.

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘jetpack CSS 404 error in site statistics’ is closed to new replies.