[wp-trac] [WordPress Trac] #38926: REST API: Validate thumbnail ID in response
WordPress Trac
noreply at wordpress.org
Thu Nov 24 10:42:09 UTC 2016
#38926: REST API: Validate thumbnail ID in response
--------------------------+-----------------------------
Reporter: iseulde | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: minor | Keywords:
Focuses: |
--------------------------+-----------------------------
I'm not sure if this is expected or not, but I'll report it because it
seems unexpected to me.
Maybe this is also not really the problem of the REST API, but it affects
it regardless.
If the post has a thumbnail ID that is invalid (e.g. the post was imported
with invalid IDs), it is still returned by the API. If linked resources
are embedded there will be a 404 error inside the response.
Of course when someone uses the api, they should check for errors in the
embeds, but it would be nice if linked resources don't 404.
`has_post_thumbnail` doesn't seem to check this either...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38926>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list