Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stylesheet fetch error with external stylesheets #4503

Closed
conwaydev opened this issue Apr 1, 2020 · 4 comments · Fixed by #4509
Closed

Stylesheet fetch error with external stylesheets #4503

conwaydev opened this issue Apr 1, 2020 · 4 comments · Fixed by #4509
Assignees
Labels
Bug Something isn't working CSS P0 High priority
Milestone

Comments

@conwaydev
Copy link

conwaydev commented Apr 1, 2020

Bug Description

Enqueueing external stylesheets no longer works and I get a "Stylesheet fetch error" in the AMP validation:

Screen Shot 2020-04-01 at 5 36 29 PM

Expected Behaviour

If I revert #4404 the validation works as expected and my styles are available on the AMP version.

Steps to reproduce

  1. Set up AMP plugin in transition mode
  2. Enqueue external stylesheets inside of a functions.php:
add_action( 'wp_enqueue_scripts', function () {
	wp_enqueue_style( 'seedlings', 'https://cms.sproutsocial.com/wp-content/themes/sprout/css/seedlings-marketing.css' );
	wp_enqueue_style( 'seedlings-cdn', 'https://media.sproutsocial.com/assets/insights/css/seedlings-marketing-7ef5e60862.css' );
} );
  1. See the styles on the non-AMP versions
  2. Update a page and see there are AMP validation issues with an error code of STYLESHEET_FETCH_ERROR

Screenshots

Screen Recording 2020-04-01 at 05 42 PM

Screen Shot 2020-04-01 at 5 34 04 PM

With 182634c9363b897fe154c0f9db1b0f2b18fe88f5 reset:

Screen Recording 2020-04-01 at 05 45 PM

Additional context

  • WordPress version: 5.4
  • Plugin version: Version 1.6.0-alpha (Noticed on 1.5.1 on production)
  • Gutenberg plugin version (if applicable): n/a
  • AMP plugin template mode: n/a
  • PHP version: 7.3
  • OS: Linux (in a vagrant env)
  • Browser: [e.g. chrome, safari] n/a
  • Device: [e.g. iPhone6] n/a

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

@westonruter
Copy link
Member

Thank you. I can reproduce this issue. Will begin work shortly.

@westonruter westonruter added Bug Something isn't working P0 High priority CSS labels Apr 1, 2020
@westonruter westonruter added this to the v1.5.2 milestone Apr 1, 2020
@pierlon pierlon self-assigned this Apr 2, 2020
@westonruter
Copy link
Member

westonruter commented Apr 3, 2020

@conwaydev Here’s a 1.5.2-RC1 pre-release build with the fix for you to test: amp.zip (v1.5.2-RC1-20200403T193031Z-3102c5dea)

@westonruter
Copy link
Member

We've just published the 1.5.2 release to WordPress.org: https://wordpress.org/plugins/amp/

You can update now via the WordPress admin.

Release notes: https://github.com/ampproject/amp-wp/releases/tag/1.5.2

@conwaydev
Copy link
Author

@westonruter as always thank you so much, y’all are the best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working CSS P0 High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants