Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#54786 closed defect (bug) (fixed)

Typo in attribute name in `wp_enqueue_block_style` function

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

Change History (14)

#1 @davidbaumwald
2 years ago

  • Component changed from General to Script Loader
  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to 5.9
  • Summary changed from typo attribute name from wp_enqueue_block_style() to 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
2 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
2 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.


2 years ago
#4

  • Keywords has-patch added; needs-patch removed

#5 @davidbaumwald
2 years ago

  • Owner set to davidbaumwald
  • Status changed from new to accepted

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

#6 @omaeyusuke
2 years ago

Thanks @davidbaumwald for your quick response!

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

#7 @Soean
2 years ago

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

#8 @hellofromTonya
2 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
2 years ago

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

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
2 years ago

  • Keywords fixed-major dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backport to the 5.9 branch.

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


2 years ago

#12 @hellofromTonya
2 years ago

  • Keywords dev-reviewed added; dev-feedback removed

LGTM. Ready for backport to 5.9-branch

#13 @davidbaumwald
2 years ago

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

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:


2 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.