WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 8 months ago

#45506 closed defect (bug) (fixed)

wp_register_tinymce_scripts() provides incorrect arguments to includes_url()

Reported by: volodymyrkolesnykov Owned by: desrosj
Milestone: 5.0.2 Priority: normal
Severity: normal Version: 5.0
Component: Script Loader Keywords: fixed-5.0 has-patch
Focuses: Cc:

Description

$scripts->add( 'wp-tinymce-lists', includes_url( "js/tinymce/plugins/lists/plugin$suffix.js", array( 'wp-tinymce' ), $tinymce_version ) );

should be

$scripts->add( 'wp-tinymce-lists', includes_url( "js/tinymce/plugins/lists/plugin$suffix.js" ), array( 'wp-tinymce' ), $tinymce_version );

Right now, array( 'wp-tinymce' ) is passed as $scheme argument to includes_url(), and according to the documentation, it should be either string or null, not an array.

Attachments (1)

45506.patch (614 bytes) - added by volodymyrkolesnykov 9 months ago.
Patch

Download all attachments as: .zip

Change History (9)

@volodymyrkolesnykov
9 months ago

Patch

#1 @volodymyrkolesnykov
9 months ago

  • Component changed from General to Script Loader
  • Keywords has-patch added

#2 @SergeyBiryukov
9 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 5.0.1

#3 @SergeyBiryukov
9 months ago

Hi @volodymyrkolesnykov, welcome to WordPress Trac!

Good catch, thanks for the report!

#4 @pento
8 months ago

  • Milestone changed from 5.0.1 to 5.0.2

#5 @desrosj
8 months ago

  • Owner set to desrosj
  • Status changed from new to assigned

#6 @desrosj
8 months ago

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

In 44211:

Script Loader: Misplaced parenthesis when wp-tinymce-lists is added.

A closing parenthesis was misplaced in the $scripts->add( 'wp-tinymce-lists' ) call, causing the dependencies and version to be incorrectly passed to includes_url() instead.

Props volodymyrkolesnykov.
Fixes: #45506.

#7 @desrosj
8 months ago

  • Keywords fixed-5.0 added; commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for merge into trunk.

#8 @desrosj
8 months ago

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

In 44308:

Script Loader: Misplaced parenthesis when wp-tinymce-lists is added.

A closing parenthesis was misplaced in the $scripts->add( 'wp-tinymce-lists' ) call, causing the dependencies and version to be incorrectly passed to includes_url() instead.

Also, Remove an incorrect parameter sent to wp_get_script_polyfill(). wp_get_script_polyfill() only accepts two parameters, but this call was passing a third.

Props volodymyrkolesnykov, swissspidy.

Merges [44208] and [44211] into trunk.

Fixes: #45506, #45472.

Note: See TracTickets for help on using tickets.