WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#42229 closed defect (bug) (fixed)

mediaelement script always loads the minified version

Reported by: johnbillion Owned by: johnbillion
Milestone: 4.9 Priority: low
Severity: normal Version:
Component: Script Loader Keywords: good-first-bug has-patch
Focuses: Cc:

Description

When enqueing mediaelement, the minified file mediaelement-and-player.min.js is always enqueued, rather than the version with the correct value for $suffix in its name according to SCRIPT_DEBUG.

Ref: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/script-loader.php?rev=41844&marks=355#L354

Dynamic $suffix removed in [23968] and fixed .min suffix introduced in [24786].

Attachments (1)

42229.patch (781 bytes) - added by dsawardekar 4 years ago.
Adds $suffix to the mediaelement enqueue

Download all attachments as: .zip

Change History (4)

@dsawardekar
4 years ago

Adds $suffix to the mediaelement enqueue

#1 @dsawardekar
4 years ago

@johnbillion I noticed this as well. A patch is attached. It uses the $suffix variable instead of the hard coded value.

#2 @johnbillion
4 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Future Release to 4.9
  • Owner set to johnbillion
  • Status changed from new to reviewing

#3 @johnbillion
4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 41879:

Media: Allow the unminified mediaelement script to be enqueued when SCRIPT_DEBUG is true.

Props dsawardekar
Fixes #42229

Note: See TracTickets for help on using tickets.