WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#15517 closed defect (bug) (fixed)

'postid' field in metaWeblog.getRecentPosts should be a string

Reported by: mrroundhill Owned by: westi
Milestone: 3.1 Priority: normal
Severity: critical Version: 3.1
Component: XML-RPC Keywords: xml-rpc
Focuses: Cc:

Description

In 3.1, the xml-rpc metaWeblog.getRecentPosts call is returning the 'postid' field as an integer when it should be a string:

http://msdn.microsoft.com/en-us/library/aa905674.aspx

Clients such as the WordPress for iPhone app can't handle the different type and force closes when refreshing the posts tab.

Attachments (1)

15517.diff (475 bytes) - added by barry 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 westi3 years ago

  • Milestone changed from Awaiting Review to 3.1
  • Owner set to westi
  • Status changed from new to accepted

comment:2 westi3 years ago

(In [16508]) Ensure that we return post IDs as strings to honour API defintions. See #15517

comment:3 westi3 years ago

We need to check the other API definitions to ensure we return the correct datatypes.

comment:4 josephscott3 years ago

I'd recommend being very cautious about this types of changes, for things that have been one way for a very long time. This might be the right thing to do, but that doesn't rule out the potential for causing problems with a large number of existing clients.

comment:5 josephscott3 years ago

  • Cc josephscott added
  • Severity changed from critical to minor

comment:6 barry3 years ago

blog_id needs to be a string too.

barry3 years ago

comment:7 westi3 years ago

  • Severity changed from minor to critical

comment:8 westi3 years ago

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

We haven't seen any more reports of broken apis since the last change which was committed in [16572]

Closing as fixed - open a new ticket for any newly discovered issues.

comment:9 kevbo2 years ago

I think a mistake was made here. The Blogger API actually says that the post ID should return a long, not a string. Also, getPost should also have been changed but is not. See ticket 20548.

Version 0, edited 2 years ago by kevbo (next)
Note: See TracTickets for help on using tickets.