Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Menus are not being saved to the correct location when you publish a snapshot #2

Closed
valendesigns opened this issue Nov 6, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@valendesigns
Copy link
Member

commented Nov 6, 2015

The menu is being created when the snapshots is published. However, Menu locations is not getting checked or updated in the dropdown. Not sure if we need to handle this with JS using something like wp.customize.bind( 'saved', function () { ... } ) or there is an issue with the data being passed to customized.

@valendesigns valendesigns added the bug label Nov 6, 2015

@valendesigns valendesigns added this to the 1.0.0 milestone Nov 6, 2015

@westonruter

This comment has been minimized.

Copy link
Contributor

commented Dec 9, 2015

Is this still an issue?

@valendesigns

This comment has been minimized.

Copy link
Member Author

commented Dec 9, 2015

@valendesigns valendesigns modified the milestones: 0.5.0, 1.0.0 Jun 12, 2016

@miina

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2016

Additionally, when a new menu is created as part of a snapshot, it won't appear in the Customizer when editing the same snapshot. It will appear when publishing the snapshot but without any added menu items.

@westonruter

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2016

It seems then that the nav_menu_item controls aren't getting added for items that are only in the Customizer state. The reason could be that the filters that change the wp_get_nav_menu_items() aren't getting added or not added early enough? Here is where the filter gets added: https://github.com/xwp/wordpress-develop/blob/45d7737eb29ab381c0cdd4072abbe7e889d7b3b0/src/wp-includes/customize/class-wp-customize-nav-menu-setting.php#L231

Here is where the nav menu items get looped over to add their controls in PHP at Customizer boot time: https://github.com/xwp/wordpress-develop/blob/45d7737eb29ab381c0cdd4072abbe7e889d7b3b0/src/wp-includes/class-wp-customize-nav-menus.php#L576-L596

@miina

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2016

Right now there are no filters handling the menu nor the menu items in the Customize Snapshot. Thanks for the hints, looking into it at this moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.