Opened 15 years ago
Closed 15 years ago
#13183 closed defect (bug) (fixed)
unused post_types show in search and cannot be deleted
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | high |
Severity: | blocker | Version: | 3.0 |
Component: | Posts, Post Types | Keywords: | has-patch dev-feedback |
Focuses: | Cc: |
Description
when you create some posts with custom post_type and then delete the custom post_type definition, the posts are still visible in search (typicaly title+excerpt, but they throw 404 when clicked).
Second problem is, that you cannot delete them (only via e.g. phpmyadmin) - first it is hard to find them, but even when you know the ID a try to direct edit it, it shows "you are not allowed to edit this item", even when I am administrator with all rights.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
The issue, we're discussing, is that for both post types and stati, we loop through post types that are registered with exclude_from_search = true, and remove them from search.
Instead, it should start from nothing and add only registered post types where exclude_from_search = false.