WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#21308 closed defect (bug) (fixed)

wp.getPost(s) missing fields

Reported by: maxcutler Owned by: ryan
Milestone: 3.4.2 Priority: normal
Severity: normal Version: 3.4
Component: XML-RPC Keywords: has-patch
Focuses: Cc:

Description

The wp.getPost and wp.getPosts XML-RPC methods introduced in 3.4 are missing some fields from the posts table:

  • post_parent
  • menu_order
  • guid
  • post_mime_type

The first two are important when dealing with pages, and the last one is important for dealing with attachments.

wp.newPost and wp.editPost properly accept these fields because they delegate to wp_insert_post which handles them correctly. For symmetry and completeness, wp.getPost and wp.getPosts should return the values.

Attachments (1)

21308.patch (869 bytes) - added by maxcutler 7 years ago.

Download all attachments as: .zip

Change History (6)

@maxcutler
7 years ago

#1 @maxcutler
7 years ago

  • Keywords has-patch added

Added patch, and committed unit test in [UT908].

#2 @nacin
7 years ago

  • Milestone changed from Awaiting Review to 3.4.2

#3 @ryan
7 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [21526]:

Return post_parent, menu_order, guid, and post_mime_type from wp.getPost(). Props maxcutler. fixes #21308

#4 @nacin
7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for 3.4.x consideration.

#5 @nacin
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In [21708]:

Return post_parent, menu_order, guid, and post_mime_type from wp.getPost(). Props maxcutler. fixes #21308 for the 3.4 branch.

Note: See TracTickets for help on using tickets.