Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#12947 closed defect (bug) (fixed)

Slugs are reset when updating post via XML-RPC

Reported by: cfinke's profile cfinke Owned by: josephscott's profile josephscott
Milestone: 3.2 Priority: normal
Severity: major Version: 2.9.2
Component: XML-RPC Keywords: has-patch
Focuses: Cc:


  1. Publish a post from the Web dashboard, and give it a custom slug. e.g., "my-custom-slug" for a post titled "How to use custom slugs."
  2. Edit that post via the XML-RPC API, but don't send a new value (or even mention) the wp_slug field.
  3. The post's slug will be reset to "how-to-use-custom-slugs"

Here's the XML I sent when editing the post (generated by ScribeFire for Chrome, which I'm currently writing):

<?xml version="1.0" encoding="UTF-8" ?>









<member><name>title</name><value><string><![CDATA[How to use custom slugs.]]></string></value></member>
<member><name>description</name><value><string><![CDATA[<p> This is a test. Testing. Testing.</p>]]></string></value></member>








Attachments (1)

post-slug-reset.diff (478 bytes) - added by nprasath002 12 years ago.

Download all attachments as: .zip

Change History (9)

#1 @archon810
12 years ago

My guess is the application itself has to pull, keep, and update the slug, but it depends on whether WP devs meant this to be by design or not. Curious to see their feedback.

#2 @westi
12 years ago

I would expect if the client didn't provide a value for the slug field that it would not be modified.

A patch which implemented this would be great :-)

#3 @nacin
12 years ago

  • Milestone changed from Awaiting Review to Future Release

#4 @nacin
12 years ago

  • Keywords needs-patch added; xmlrpc scribefire slug removed

#5 @nprasath002
12 years ago

  • Cc n.prasath.002@… added
  • Keywords has-patch added

In editing posts if the slug was not mentioned
we should get the current postname not set it to blank.
Tested with a java client and works fine

#6 @nprasath002
12 years ago

  • Keywords needs-patch removed

#7 @josephscott
12 years ago

  • Cc joseph@… added
  • Milestone changed from Future Release to 3.2

+1 to this, the proposed patch solves the issue. Going to mark this as a potential WP 3.2 item.

#8 @josephscott
12 years ago

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

(In [17648]) Don't reset the post slug on XML-RPC calls.

Fixes #12947 props cfinke, nprasath002

Note: See TracTickets for help on using tickets.