Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#42393 closed defect (bug) (invalid)

Enqueue CDN Script With Dependency

Reported by: tabboy's profile tabboy Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8.1
Component: General Keywords:
Focuses: Cc:

Description

If I try and enqueue a CDN script with a dependecy the page returns a 503 error.

<?php
wp_enqueue_style( 'font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', array('parent-style'), '4.7.0' );

Removing the dependency to 'parent-style' resolves the issue and the page loads normally.

Change History (2)

#1 @JPry
7 years ago

  • Keywords close added

Hi @tabboy, welcome to Trac!

This site is meant for tracking issues related to the core WordPress codebase. For help with your own custom code, the best place to post would be on the WordPress Support Forums.

#2 @desrosj
5 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

I'm going to close this out because it seems like an issue with your setup, @tabboy. Please reopen if you can add detailed steps to reproduce the issue and point to a bug in WordPress Core.

Also, make sure that when you call wp_enqueue_style() you are doing so on the wp_enqueue_scripts action hook.

Note: See TracTickets for help on using tickets.