Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#13183 closed defect (bug) (fixed)

unused post_types show in search and cannot be deleted

Reported by: thomask Owned by:
Milestone: 3.0 Priority: high
Severity: blocker Version: 3.0
Component: Posts, Post Types Keywords: has-patch dev-feedback
Focuses: Cc:


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)

13183.diff (787 bytes) - added by sivel 10 years ago.

Download all attachments as: .zip

Change History (5)

#1 @sivel
10 years ago

  • Severity changed from normal to blocker

#2 @nacin
10 years ago

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.

10 years ago

#3 @sivel
10 years ago

  • Keywords has-patch dev-feedback added

First pass to *include* the registered post types that are included in search rather than excluding post types that are not included in the search...that really sounds confusing.

#4 @ryan
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [14419]) White list instead of black list post types when searching. Props sivel. fixes #13183

Note: See TracTickets for help on using tickets.