Make WordPress Core

Opened 4 years ago

Closed 2 years ago

#35328 closed defect (bug) (maybelater)

In Customizer the Nav Menu Item saves to fail to return the expected response

Reported by: sarahpressler Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Menus Keywords: reporter-feedback
Focuses: Cc:


Steps to reproduce (or rather - exactly what I did that ended up with this hiccup)

  1. Menu was already created & I wanted to add some subpages
  2. open customizer from front end
  3. add subpages to the menu then drag/drop them in place
  4. save and publish
  5. add more subpages to the menu then drag/drop them in place
  6. save and publish
  7. add more subpages to the menu then drag/drop them in place
  8. save and publish
  9. view front end of site
  10. front end megamenu shows triple pages in the menu dropdown

(Ignore text in front of menu - that’s being addressed and not related to megamenu/customizer.)

  1. Go to Dashboard
  2. Navigate to Appearance > Menus
  3. Find this: https://www.dropbox.com/s/dffd79ybm1fypaq/Screenshot%202015-12-24%2013.08.13.png?dl=0
  4. Manually remove
  5. Save
  6. Find this: https://www.dropbox.com/s/0xcs2i1rewxlhji/Screenshot%202015-12-24%2013.11.43.png?dl=0

This isn’t the first time I’ve seen this - but last time I just thought I had done something wrong. It’s easy to fix - just something I thought I’d share w/you.

Change History (2)

#1 @westonruter
4 years ago

  • Keywords reporter-feedback added

I can't reproduce the issue on in install without any plugins active. However, I was able to reproduce this issue on a site that had the Customize Posts plugin installed. The plugin had an old shim that implemented the customize_save_response filter (with a different name) before it was added to Core in 4.2, and it caused menus in the Customizer to fail to communicate back the IDs for inserted nav menus, resulting in the behavior described in this ticket. Fixed issue with that plugin in https://github.com/xwp/wp-customize-posts/commit/2ef19532f8c5800bcd6ebf771e7336d0dc296e0e

Likewise, if a plugin erroneously overrides the customize_save_response with a filter like:

add_filter( 'customize_save_response', function() {
    return array( 'foo' => 'bar' );
} );

Then this same behavior would be experienced. Instead plugins should extend the existing $response array like:

add_filter( 'customize_save_response', function( $response ) {
    return array_merge( $response, array( 'foo' => 'bar' ) );
} );

Please send me a ZIP of the plugins activated on the site so that I can test.

#2 @welcher
2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

No movement on this in 2 years Closing.

Note: See TracTickets for help on using tickets.