Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#20697 closed defect (bug) (fixed)

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

Reported by: koke's profile koke Owned by: nacin's profile nacin
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.1
Component: XML-RPC Keywords: has-patch
Focuses: Cc:

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 13 years ago.
patch-core-20697.2.diff (1.1 KB) - added by koke 13 years ago.

Download all attachments as: .zip

Change History (13)

#1 @koke
13 years ago

  • Keywords has-patch added

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

#2 @koke
13 years ago

  • Summary changed from XML-RPC metaWeblog calls save posts 'standard' post format to XML-RPC metaWeblog calls save posts with 'standard' post format

#3 @andyadams
13 years ago

  • Cc aadams@… added

#4 @duck_
13 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 3.4 to 3.1

[16484] for #15405. Patch looks good.

#5 @andyadams
13 years ago

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.

#6 @nacin
12 years ago

  • Milestone changed from Future Release to 3.5

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

#7 @nacin
12 years ago

In [21145]:

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

#8 @nacin
12 years ago

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.

#9 @markoheijnen
12 years ago

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.

#10 @nacin
12 years ago

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.

#11 @nacin
12 years ago

  • 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.