Menu items get deleted with the user who created them
|Reported by:||nacin||Owned by:||ryan|
|Severity:||major||Keywords:||has-patch commit needs-codex|
|Cc:||flashingcursor, aaroncampbell, ben@…|
Say a user edits a nav menu or two, adding some menu items. Then, said user gets deleted. Rut roh:
SELECT ID FROM $wpdb->posts WHERE post_author = %d
The menu items were tied to them, therefore they are deleted.
We need to ensure that wp_delete_user() doesn't touch nav menu items.
This has repercussions for any post type that doesn't care about authors. Tempted to actually check, post_type_supports(), which is typically reserved for UI-level actions. Otherwise, post_author always gets stored, and that seems to be just a bit of a problem. (It could be argued this is a UI-level check, in terms of confirming things to delete.)
Unsure how this didn't come up previously. Reported by flashingcursor over Twitter.
Change History (28)
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.1
- Keywords 3.2-early added; dev-feedback removed
- Milestone changed from 3.1 to Future Release
- Severity changed from critical to major
comment:13 jane — 2 years ago
- Keywords 3.3-early removed
- Milestone changed from Future Release to 3.4
comment:18 ryan — 19 months ago
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed