Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#39353 closed defect (bug) (fixed)

Customize: menu widgets lose edit shortcuts when added/refreshed

Reported by: sirbrillig's profile sirbrillig Owned by: westonruter's profile westonruter
Milestone: 4.7.3 Priority: normal
Severity: normal Version: 4.7
Component: Customize Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

When a Custom Menu widget is first added to a page or when it is refreshed (eg: by changing its title), the menu does does not have an edit shortcut added. The widget does get an edit shortcut (see #39352 for info about the two shortcuts) but the one for the menu is not present until the customizer is reloaded.

Steps to reproduce:

  • Make sure your site has at least one nav menu created.
  • Add a new Custom Menu widget in a theme that supports partials (eg: Twenty Seventeen).
  • Set that widget to display an existing nav menu.
  • Click on the edit shortcut for the widget.

Expected behavior: the nav menu control will be shown.

Actual behavior: the widget control is shown.

Originally reported by @westonruter in #39101.

Attachments (2)

menu-widget-nested-nav-menu-edit-shortcut-dropped.mov (3.9 MB) - added by westonruter 8 years ago.
39353.0.diff (1.6 KB) - added by westonruter 8 years ago.

Change History (14)

#1 @westonruter
8 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

#2 @celloexpressions
8 years ago

This could possibly be in 4.7.2 if it gets a patch in time since it's introduced in 4.7.

#3 @SergeyBiryukov
8 years ago

  • Version changed from trunk to 4.7

#4 @westonruter
8 years ago

  • Milestone changed from Future Release to 4.7.2

We can assign to 4.7.2 for now.

#5 @tristangemus
8 years ago

Either this was fixed in 4.7.2 or I don't understand the problem.

https://core.trac.wordpress.org/ticket/39101

When I add a custom menu widget to the sidebar in twentyseventeen, I get two edit icons. The top edit icon brings up the widget settings, the one beneath it brings up the menu settings.

#6 @westonruter
8 years ago

@tristangemus see menu-widget-nested-nav-menu-edit-shortcut-dropped.mov. You can see that at the moment the widget's title changes, the second edit shortcut for the nested partial gets unexpectedly dropped.

@westonruter
8 years ago

#7 @westonruter
8 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

@sirbrillig would you give 39353.0.diff a try? The issue is that we need to ensure that we set up the edit shortcuts for nested partial placements.

#8 @sirbrillig
8 years ago

Tested. Seems to solve the issue for me!

#9 @westonruter
8 years ago

  • Keywords commit added; needs-testing removed
  • Owner set to westonruter
  • Status changed from new to accepted

#10 @westonruter
8 years ago

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

In 40055:

Customize: Ensure edit shortcuts get re-created for nested partials when a parent partial is refreshed.

Fixes issue where the edit shortcut for a nav menu gets dropped when the containing Custom Menu widget is updated.

See #39101.
Fixes #39353.

#11 @westonruter
8 years ago

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

Re-opening for consideration in 4.7.3.

#12 @dd32
8 years ago

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

In 40097:

Customize: Ensure edit shortcuts get re-created for nested partials when a parent partial is refreshed.

Fixes issue where the edit shortcut for a nav menu gets dropped when the containing Custom Menu widget is updated.

Props westonruter.
Merges [40055] to the 4.7 branch.
See #39101.
Fixes #39353.

Note: See TracTickets for help on using tickets.