[wp-trac] [WordPress Trac] #63766: REST API fails if subtype CPT doesnt exist in Search Endpoint

WordPress Trac noreply at wordpress.org
Wed Jul 30 14:47:55 UTC 2025


#63766: REST API fails if subtype CPT doesnt exist in Search Endpoint
-------------------------+------------------------------
 Reporter:  SirLouen     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  REST API     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  2nd-opinion  |     Focuses:
-------------------------+------------------------------

Comment (by SirLouen):

 Replying to [comment:3 marincarroll]:
 > @SirLouen In my case, the various custom post types I was querying were
 registered by plugins. If one of the plugins isn't active, you don't get
 any results. It would have been preferable for me if it returned results
 for whichever CPTs are registered rather than no results, so that various
 combinations of plugins can be activated/deactivated while the search
 still works, but I can see an argument where I should have been
 responsible for checking which were registered beforehand.

 I was thinking that this could be the issue. It's a pretty edge case and
 as you say, there is an argument for not doing a correct use. On the other
 hand, since it's an open search query, it should not be that restrictive
 for pretty much anything (like a fuzzy search). I cannot really decide
 which option of the two fits better. Personally, I always prefer the least
 strictness on search queries possible, but I can also see the argument of
 being strict to ensure more consistency. This is why I added the `2nd-
 opinion`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63766#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list