Opened 8 years ago
Closed 8 years ago
#38719 closed defect (bug) (fixed)
Prevent trashed customize_changeset posts from being erroneously mutated
Reported by: | westonruter | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Customize | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description (last modified by )
When revisions support is not added for customize_changeset
posts, then when a changeset is transitioned (from auto-draft
) to the publish
status, then it will immediately be transitioned to trash
so that it will be garbage collected. There are two problems with this right now in core:
- If any of the JSON content has any strings containing HTML that
kses
doesn't like, it will get stripped when callingwp_trash_post()
(if a privileged user is not logged in when published. e.g. during WP Cron). See #38715. - The
post_name
is mutated by appending__trashed
. This is problematic when someone bookmarks a customizer session. If they return to the session and the changeset has been published or trashed, they should be shown a notice to that effect. With the suffix being added, this then fails for trashed changesets.
See _wp_customize_publish_changeset()
for where wp_trash_post()
is called.
Attachments (2)
Change History (6)
Note: See
TracTickets for help on using
tickets.
https://github.com/xwp/wordpress-develop/pull/198