[wp-trac] [WordPress Trac] #42489: New pages scheduled via Customizer trashed when changeset publish triggered by visitor
WordPress Trac
noreply at wordpress.org
Thu Nov 9 22:00:12 UTC 2017
#42489: New pages scheduled via Customizer trashed when changeset publish triggered
by visitor
-------------------------------------+--------------------------
Reporter: bwmarkle | Owner: westonruter
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.9
Component: Customize | Version: 4.9
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+--------------------------
Changes (by westonruter):
* keywords: => has-patch needs-testing
Comment:
@bwmarkle Thank you ''very'' much for your detailed test case and report.
I've identified the problem and it makes complete sense why it wasn't
working when not logged-in. The
`\WP_Customize_Nav_Menus::save_nav_menus_created_posts()` handler was not
getting added to the `customize_save_nav_menus_created_posts` if the
current user cannot `edit_theme_options`. By moving this `add_action()`
call up then it successfully triggers when the changeset is published
without an authenticated users. Please apply [attachment:42489.diff] and
attempt to re-reproduce the problem.
Test script I put together to automate the steps to reproduce:
https://gist.github.com/westonruter/a38db7bd13a8d58695a66453570338de
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42489#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list