Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#26679 closed defect (bug) (fixed)

metaWeblog.getRecentPosts missing `sticky`

Reported by: soulseekah's profile soulseekah Owned by: nacin's profile nacin
Milestone: 3.9 Priority: normal
Severity: minor Version:
Component: XML-RPC Keywords: has-patch
Focuses: Cc:

Description states "struct: see #metaWeblog.getPost for fields", but sticky is not returned, although valuable.

See:, for example

Attachments (2)

26679.diff (622 bytes) - added by soulseekah 11 years ago.
26679.1.diff (624 bytes) - added by soulseekah 11 years ago.

Download all attachments as: .zip

Change History (11)

11 years ago

11 years ago

#1 @soulseekah
11 years ago

Should be $entry, not $post.

#2 @maxcutler
11 years ago

As you seem to have discovered on your own in that GitHub issue, a better approach would be to just use the wp.getPosts method instead. It was added in 3.4, so compatibility should be fine for the mobile apps; certainly better than waiting for 3.9 or later. You should consider the Movable Type API deprecated at this point.

#3 @soulseekah
11 years ago

  • Severity changed from normal to minor

wp.getPosts is indeed a superior API and hopefully the lead developers will want to move WordPress for Android over to it instead. But overall, this is a trivial miss that wasn't covered in the Codex until now, and it's trivial to fix, too.

But wherever this ticket ends up - I'm fine with it.

#4 @SergeyBiryukov
11 years ago

  • Keywords has-patch added

#5 @markoheijnen
11 years ago

I'm fine that this patch gets committed but it's not a fix for the mobile apps. Since for them it's better to switch to wp.getPosts to have better support for it.

#6 @soulseekah
11 years ago

I can't but agree. I'm going to push for wp.getPosts there for sure, since it's far more superior. This ticket should be unrelated to the mobile app and not dependent on it; it's a mere trivial bugfix, where the Codex promised sticky but it was not delivered.

#7 @SergeyBiryukov
11 years ago

  • Milestone changed from Awaiting Review to 3.9

#8 @maxcutler
10 years ago

  • Summary changed from mt.getRecentPosts missing `sticky` to metaWeblog.getRecentPosts missing `sticky`

Updated the ticket title since this is actually a MetaWeblog method, not a MoveableType one. Ideally this field would actually be called wp_sticky to make it clear that it's a WordPress-specific extension, but it appears we already called it sticky in metaWeblog.getPost and metaWeblog.editPost.

I'd prefer not to encourage continued use of these old methods by adding new features to them, but I'm okay with doing this for the sake of consistency.

#9 @nacin
10 years ago

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

In 27553:

XML-RPC: Include 'sticky' in the struct returned from metaWeblog.getRecentPosts.

Using wp.getPosts is preferred and non-WP XML-RPC APIs are no longer actively maintained. This is simply for parity with existing MW methods.

props soulseekah.
fixes #26679.

Note: See TracTickets for help on using tickets.