Opened 10 years ago
Closed 10 years ago
#38719 closed defect (bug) (fixed)
Prevent trashed customize_changeset posts from being erroneously mutated
| Reported by: | westonruter | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7 |
| Component: | Customize | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
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
ksesdoesn'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_nameis 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
https://github.com/xwp/wordpress-develop/pull/198