Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#53487 closed defect (bug) (fixed)

Empty move to options in Widgets Customizer

Reported by: kevin940726's profile kevin940726 Owned by: hellofromtonya's profile hellofromTonya
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Widgets Keywords: has-patch has-unit-tests commit
Focuses: Cc:

Description

When trying to move a block to another widget area in the new block based Widgets Customizer, the dropdown shows the correct number of options and clicking on them works as expected, but the label are all empty. (See the image below)

I believe it's a core merge issue, as Gutenberg is registering both label and description field,
https://github.com/WordPress/gutenberg/blob/57ae6eea5d18e57ffa72607dc21eacc90e1c7035/lib/widgets-customize.php#L47-L59

but Core is not registering those fields.
https://github.com/WordPress/wordpress-develop/blob/bdf7dd6299e4453f9d7438de0a0e138d950ec0bf/src/wp-includes/class-wp-customize-widgets.php#L479-L486

Testing instructions

  1. Enable a theme with multiple widget areas (TwentyTwenty for instance)
  2. Go to Appearance -> Customize -> Widgets
  3. Try to move a block from one to another

Attachments (2)

image (2).png (8.0 KB) - added by kevin940726 3 years ago.
Move to dropdown showing empty labels in Widgets Customizer
53487-testing.gif (3.9 MB) - added by hellofromTonya 3 years ago.
Testing before and after applying PR 1428 => Before shows problem; After resolves it.

Change History (11)

@kevin940726
3 years ago

Move to dropdown showing empty labels in Widgets Customizer

#1 @noisysocks
3 years ago

  • Milestone changed from Awaiting Review to 5.8

#2 @noisysocks
3 years ago

  • Keywords needs-patch added

#3 @hellofromTonya
3 years ago

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

I can reproduce the problem. Working on a patch and tests.

This ticket was mentioned in PR #1428 on WordPress/wordpress-develop by hellofromtonya.


3 years ago
#4

  • Keywords has-patch has-unit-tests added; needs-patch removed

Trac ticket: https://core.trac.wordpress.org/ticket/53487

  • Added tests for both classic widgets and widgets block editor. Tests failed as expected ✅
  • Added the label and description
  • Reran tests. Tests pass ✅

Manually testing => works as expected. See notes in ticket.

@hellofromTonya
3 years ago

Testing before and after applying PR 1428 => Before shows problem; After resolves it.

#5 @hellofromTonya
3 years ago

  • Keywords commit added

Testing

Env:

  • OS: macOS Big Sur
  • Browser: Chrome, Safari, and Firefox
  • Plugins: none
  • Theme: Twenty Twenty
  • WordPress: current trunk

Before Patch

Able to reproduce the problem, i.e. the Move To dropdown is not populated. ✅

After Patch

The Move To dropdown is populated with the registered sidebars. Selecting correctly moves the widget to the selected sidebar. ✅

Works as expected ✅ .

Marking for review and commit.

Last edited 3 years ago by hellofromTonya (previous) (diff)

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


3 years ago

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


3 years ago

#8 @desrosj
3 years ago

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

In 51228:

Widgets: Add missing label and description to Customizer controls.

This fixes a bug where the “Move To” dialogue was empty when a theme has multiple widget areas.

Props kevin940726, noisysocks, hellofromTonya.
Fixes #53487.

Note: See TracTickets for help on using tickets.