Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am publishing the following post via xmlrpc

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><meta name="Generator" content="Microsoft Word 14 (filtered)"></head><body lang="EN-US">

<div class="WordSection1">

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none"><b><span style='font-size:9.0pt;font-family:"ArialNarrow","sans-serif";
color:red'>This is a new document</span></b></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none"><b><span style='font-size:9.0pt;font-family:"ArialNarrow","sans-serif";
color:red'> </span></b></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none"><b><span style='font-size:9.0pt;font-family:"ArialNarrow","sans-serif";
color:red'>Test Test Test</span></b></p>

</div>

</body></html> 

With define('SAVEQUERIES', true); option in wp-config, the following MySQL query is produced:

(
    [0] => UPDATE `s_6_posts` SET `post_author` = 9, `post_date` = '2012-04-11 20:40:05', `post_date_gmt` = '2012-04-11 20:40:05', `post_content` = '\n\n\n<div class=\"WordSection1\">\n\n<p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal\"><b><span style=\'font-size:9.0pt;font-family:\"ArialNarrow\",\"sans-serif\";color:red\'>This is a new document</span></b></p>\n\n<p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal\"><b><span style=\'font-size:9.0pt;font-family:\"ArialNarrow\",\"sans-serif\";color:red\'> </span></b></p>\n\n<p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal\"><b><span style=\'font-size:9.0pt;font-family:\"ArialNarrow\",\"sans-serif\";color:red\'>Test Test Test</span></b></p>\n\n</div>\n\n\n', `post_content_filtered` = '', `post_title` = '', `post_excerpt` = '', `post_status` = 'draft', `post_type` = 'post', `comment_status` = 'open', `ping_status` = 'open', `post_password` = '', `post_name` = '', `to_ping` = '', `pinged` = '', `post_modified` = '2012-04-11 20:40:05', `post_modified_gmt` = '2012-04-11 20:40:05', `post_parent` = 0, `menu_order` = 0, `guid` = 'https://qa.citivelocity.com/cvauthor/equitywire/?p=230' WHERE `ID` = 230
    [1] => 0.12744808197021
    [2] => wp_xmlrpc_server->serve_request, IXR_Server->IXR_Server, IXR_Server->serve, IXR_Server->call, wp_xmlrpc_server->mw_newPost, wp_insert_post
)

When I look at the database after the insert, the post_content column only contains

<div class="WordSection1">

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal"><b><span style='font-size:9.0pt;font-family:"ArialNarrow","sans-serif";color:red'>This is a new document</span></b></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal"><b><span style='font-size:9.0pt;font-family:"ArialNarrow","sans-serif";color:red'>

What is happening here is in

<span style='font-size:9.0pt;font-family:"ArialNarrow","sans-serif";
    color:red'> </span>

block, everything after the space between <span> tag is cut off. I manually ran the MySQL update statement from console and it inserts the data properly.

The collation for mysql is utf8_general_ci and the data does not contain any special characters. I am at a lost as to why this is happening.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.