amu dan hani
family journal
family journal
May 4th
2010 has so far been an eventful one. So many things have come to pass and there are more changes coming in the near future. One of the hard thing that happened to us was the death of my father in February. No one expects death and not certainly for a healthy man who is in his early 60s. My father choose to leave us but he made sure that we are all doing well. Even in his last days he put his children comfort and care before his own. He’s my earthly father that I will not be able to see anymore, but I’m thankful for my Heavenly Father who is always with me.
There is another huge transition coming our way this Summer. Some of you might already knew about it, but for those of you who don’t – we’ll keep you posted with updates here in this blog.
Chao for now!
Jan 21st
The latest release of WordPress 2.9.1 has a minor bug in the xmlrpc.php file which prevents the user from creating a new post remotely. There are quite a lot of issues with the xmlrpc.php, one being that the xml returned is not well-formed and the other is calling an method on an array.
I ran across these issues when I was trying to import some posts into WordPress using XMLRPC with Zend_XmlRpc_Client.
Anyway, the patch here will allow you to insert the post:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | Index: xmlrpc.php =================================================================== @@ -2195,13 +2195,16 @@ // Do some timestamp voodoo if ( !empty( $content_struct['date_created_gmt'] ) ) - $dateCreated = str_replace( 'Z', '', $content_struct['date_created_gmt']->getIso() ) . 'Z'; // We know this is supposed to be GMT, so we're going to slap that Z on there by force + $dateCreated = $content_struct['date_created_gmt']; elseif ( !empty( $content_struct['dateCreated']) ) - $dateCreated = $content_struct['dateCreated']->getIso(); + $dateCreated = $content_struct['dateCreated']; + if ( !empty( $dateCreated ) ) { - $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); - $post_date_gmt = iso8601_to_datetime($dateCreated, GMT); + $dateIXR = new IXR_Date(strtotime($dateCreated)); + $dateCreated = $dateIXR->getIso(); + $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); + $post_date_gmt = iso8601_to_datetime($dateCreated. "Z", GMT); } else { $post_date = current_time('mysql'); $post_date_gmt = current_time('mysql', 1); |
Copy the above code to a file, call it xmlrpc.patch. To patch the content of xmlrpc.php which is located say under directory public:
1 | ~/public$ patch -p0 < xmlrpc.patch |