Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#54786 closed defect (bug) (fixed)

Typo in attribute name in `wp_enqueue_block_style` function

Reported by: omaeyusuke Owned by: davidbaumwald
Priority: normal Milestone: 5.9
Component: Script Loader Version: 5.9
Severity: normal Keywords: good-first-bug has-patch fixed-major commit dev-reviewed
Cc: Focuses: rtl

Description

Attachments (1)

54786-typo-fix.patch (474 bytes ) - added by sachinrajcp123 12 months ago.

Download all attachments as: .zip

Change History (15)

#1 @davidbaumwald
5 years ago

  • Component GeneralScript Loader
  • Keywords needs-patch good-first-bug added
  • Milestone Awaiting Review5.9
  • Summary typo attribute name from wp_enqueue_block_style()Typo in attribute name in `wp_enqueue_block_style` function

@omaeyusuke Thanks for the ticket and welcome to WordPress Core Trac! I'm updating this ticket to 5.9 so it can be fixed before the final release.

#2 @davidbaumwald
5 years ago

Tagged as good-first-bug as well. Looks like the fix here is just to change

wp_style_add_data( $args['hanle'], 'rtl', 'replace' );

to...

wp_style_add_data( $args['handle'], 'rtl', 'replace' );

@omaeyusuke Do you want to work up a quick patch?

#3 @omaeyusuke
5 years ago

Do you want to work up a quick patch?

yes!

This ticket was mentioned in PR #2135 on WordPress/wordpress-develop by yusuke-omae.


5 years ago
#4

  • Keywords has-patch added; needs-patch removed

#5 @davidbaumwald
5 years ago

  • Owner set to davidbaumwald
  • Status newaccepted

Thanks @omaeyusuke! Looks good to me. I’ll get this merged in tomorrow.

#6 @omaeyusuke
5 years ago

Thanks @davidbaumwald for your quick response!

Last edited 5 years ago by omaeyusuke (previous) (diff)

#7 @Soean
5 years ago

There is also a fix in the Gutenberg Project: https://github.com/WordPress/gutenberg/pull/37849

#8 @hellofromTonya
5 years ago

  • Keywords commit added

Great find @omaeyusuke 👏 The patch looks ready. Marking for commit.

Thanks @Soean for linking the Core fix to Gutenberg fix.

#9 @davidbaumwald
5 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 52558:

Script Loader: Fix a variable typo in wp_enqueue_block_style.

In wp_enqueue_block_style when rtl versions of CSS files are detected, wp_style_add_data is called to add the metadata to the registered sheet. However, the stylesheet handle argument is misspelled as hanle. This change corrects the argument name.

Props omaeyusuke.
Fixes #54786.

#10 @davidbaumwald
5 years ago

  • Keywords fixed-major dev-feedback added
  • Resolution fixed
  • Status closedreopened

Reopening for backport to the 5.9 branch.

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


5 years ago

#12 @hellofromTonya
5 years ago

  • Keywords dev-reviewed added; dev-feedback removed

LGTM. Ready for backport to 5.9-branch

#13 @davidbaumwald
5 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 52560:

Script Loader: Fix a variable typo in wp_enqueue_block_style.

In wp_enqueue_block_style when rtl versions of CSS files are detected, wp_style_add_data is called to add the metadata to the registered sheet. However, the stylesheet handle argument is misspelled as hanle. This change corrects the argument name.

Props omaeyusuke.
Merges [52558] to the 5.9 branch.
Fixes #54786.

dream-encode commented on PR #2135:


5 years ago
#14

Merged into core in https://core.trac.wordpress.org/changeset/52558 and backported to the 5.9 branch in https://core.trac.wordpress.org/changeset/52560.

Great job @yusuke-omae!

Note: See TracTickets for help on using tickets.