[wp-trac] [WordPress Trac] #48314: REST endpoint for getting media will return 401 if first post to use it as featured image is in the trash
WordPress Trac
noreply at wordpress.org
Tue Oct 15 19:24:13 UTC 2019
#48314: REST endpoint for getting media will return 401 if first post to use it as
featured image is in the trash
--------------------------+-----------------------------
Reporter: andregumieri | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: normal | Keywords:
Focuses: rest-api |
--------------------------+-----------------------------
Version:
5.2.4
Steps to reproduce:
- Create a post
- Upload a featured image to it
- Save the post and then send it to trash
- Create a second post
- Use the same featured image as the trashed post
- Save the post
- Try to access the media through /wp-json/wp/v2/media/<id>
The result will be
{"code":"rest_forbidden","message":"Sorry, you are not allowed to do
that.","data":{"status":401}}
Expectation would be to have the featured image data
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48314>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list