Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #40399


Ignore:
Timestamp:
07/09/2019 07:00:54 PM (6 years ago)
Author:
TimothyBlynJacobs
Comment:

You should absolutely be able to PUT back the response from a GET request. Perhaps we need to add a custom validate_callback the same way we did for templates in #39996.

In the meantime, to work around this you should be able to omit the status field from your request and WordPress will ignore it.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #40399 – Description

    initial v3  
    11I'm trying to use the REST API to update a post_meta field on an an image of post_type="attachment", which is itself attached to an existing post of post_type="post" that is published and password protected.
    22
    3 Since the image is an attachment that is attached to another post, Wordpress has set the post_status of the attachment to "inherit".
     3Since the image is an attachment that is attached to another post, WordPress has set the post_status of the attachment to "inherit".
    44
    55When I try to update the attachment from the REST API endpoint I'm getting the following error: