[wp-trac] [WordPress Trac] #44219: null post json object reference when retrieve a media item

WordPress Trac noreply at wordpress.org
Fri May 25 11:17:50 UTC 2018


#44219: null post json object reference when retrieve a media item
-------------------------------+------------------------------
 Reporter:  nurcholisart       |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  REST API           |     Version:  4.8.2
 Severity:  normal             |  Resolution:  invalid
 Keywords:  reporter-feedback  |     Focuses:  rest-api
-------------------------------+------------------------------
Changes (by nurcholisart):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Replying to [comment:4 birgire]:
 > @nurcholisart
 >
 > Just to make sure we're talking about the same thing, can you please try
 the following:
 >
 > 1. Go to the edit post screen: {{{/wp-
 admin/post.php?post=7634&action=edit}}}.
 > 2. Click the "Add Media" button.
 > 3. Upload a new image, from your computer.
 > 4. Close the Media popup.
 > 5. Set that new image as the featured image.
 > 6. Save post.
 >
 > and check again
 >
 > - {{{/wp-json/wp/v2/posts/7634}}}
 > - {{{/wp-json/wp/v2/media/???}}}
 >
 > Thanks.
 >
 > ps: the featured image is stored in the post meta, so it doesn't have to
 be attached to the post.

 hi @birgire i have tried your suggestion, and now it's work! now i can see
 the post object value in {{{/wp-json/wp/v2/media/7636}}}. Thank you very
 much...

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


More information about the wp-trac mailing list