Jetpack: Likes: Invalid CSS issue causing un-necessary 404 Request

Created on 7 Jul 2017  ·  13Comments  ·  Source: Automattic/jetpack

I noticed Jetpack was causing a 404 HTTP request. This line in css/jetpack.css seems to be causing it:

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

It seems like it's from modules/likes/style.css even though it's properly formatted there. It's probably related to build system.

Likes [Pri] BLOCKER [Type] Bug

Most helpful comment

I don't think we need to continue to report impacted users. The cause is known and we should advise folks it'll be fixed in an upcoming release.

All 13 comments

3309853-t

Someone shared a quick fix on the link shared by @danjjohnson
https://wordpress.org/support/topic/jetpack-css-404-error-in-site-statistics/

Quick fix until JetPack issues a patch: remove the offending line from the file wp-content/plugins/jetpack/css/jetpack.css, i.e. remove line
@font-face{font-family:”Open Sans”;src:url(‘”https://fonts.googleapis.com/css?family=Open+Sans”‘)}

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

Also reported here: 3311161-t

Also reported here: 3311033-t

And in 3311085-t

@codestor4 yep that was me. I'm not a css expert though, so I'm not sure what the permanent fix would have to be.

reported here: 3313062-t

Seeing errors here 3311730-t

Reported 3312581-t

3313123-t

I don't think we need to continue to report impacted users. The cause is known and we should advise folks it'll be fixed in an upcoming release.

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.

@kvibber Thanks for the report. I hadn't heard that particular symptom of this. I've upgraded this and the patch to blocker status to ensure we get it in the next release.

Was this page helpful?
0 / 5 - 0 ratings