Opened 12 months ago

Closed 7 months ago

#20697 closed defect (bug) (fixed)

XML-RPC metaWeblog calls save posts with 'standard' post format

Reported by: koke Owned by: nacin
Priority: normal Milestone: 3.5
Component: XML-RPC Version: 3.1
Severity: normal Keywords: has-patch
Cc: aadams@…

Description

As seen here http://ios.trac.wordpress.org/ticket/1069#comment:1

Steps to replicate:

  1. Create a standard post using the regular web interface.
  2. Edit and save the post using the iOS app.
  3. Go back to web interface and you'll see an extra standard button.

Screenshot: http://img.thethemefoundry.com/two-standard-formats.png

The new wp.* methods do this right by using set_post_format() instead of calling wp_set_post_terms() directly

Attachments (2)

patch-core-20697.diff (1.1 KB) - added by koke 12 months ago.
patch-core-20697.2.diff (1.1 KB) - added by koke 12 months ago.

Download all attachments as: .zip

Change History (13)

koke12 months ago

koke12 months ago

  • Keywords has-patch added

Sorry for the duplicate patch. It's the same file, but accidentally double-clicked on the upload button

  • Summary changed from XML-RPC metaWeblog calls save posts 'standard' post format to XML-RPC metaWeblog calls save posts with 'standard' post format
  • Cc aadams@… added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 3.4 to 3.1

[16484] for #15405. Patch looks good.

Has this made it into 3.4? I'm not familiar with Trac and the whole process, so forgive me if that's a dumb question.

I ask because this seems like a critical bug - creating a completely different post format is relatively major IMO.

  • Milestone changed from Future Release to 3.5

We might need an upgrade routine to knock out post-format-standard terms from the DB.

In [21145]:

Use set_post_format(), not wp_set_post_terms(), in XML-RPC mw_newPost and mw_editPost. props koke. see #20697.

Also, formats should be set prior to wp_insert_post(), that way on publish, a plugin knows what format the post is. The new wp method handls this, but mw does not look like it does.

mw_newPost does it correct but mw_editPost doesn't. There is still a lot of things happening after wp_update_post in mw_editPost.
Wonder if that should be fixed or not.

Two things:

  • At the very least let's make sure that post formats are applied prior to publish in all XML-RPC methods.
  • Upgrade routine to knock out post-format-standard terms from the DB.
  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 22422:

Remove the post-format-standard term on upgrade if it exists in the database. fixes #20697.

Note: See TracTickets for help on using tickets.