WordPress.org

Ready to get started?Download WordPress

Forums

Bug: XMLRPC not inserting post_name (4 posts)

  1. garth
    Member
    Posted 10 years ago #

    Noticed this in 1.0.1, but apparently it is present in the 1.0 code as well, and has not been addressed in the latest nightlies.
    So in xmlrpc.php, the wp_insert_post needs to be modified with
    $post_name = sanitize_title($post_title);
    and the insert query needs to be modified with post_name
    (post_author, post_date, post_content, post_title, post_excerpt, post_category, post_status, post_name) VALUES('$post_author','$post_date','$post_content','$post_title', '$post_excerpt','$post_cat', '$post_status','$post_name')";
    I noticed this when using Bloggar to add a post to my blog and the dashed title wasn't showing up in the url.

  2. Cena
    Member
    Posted 10 years ago #

    Have you tried the CVS? Dougal committed a bunch of fixes to XMLRPC last night.

  3. garth
    Member
    Posted 10 years ago #

    no, cvs does not show these fixes.

  4. Dougal Campbell
    Member
    Posted 10 years ago #

    Good catch. Patched and committed.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.