[TxMt] Wordpress 2.2 and Pings/Comments

Allan Odgaard throw-away-1 at macromates.com
Mon Jun 11 09:15:01 UTC 2007


On 11. Jun 2007, at 00:35, Christoph Koehler wrote:


Joseph Scott: For context, the thread starts here: http:// 
lists.macromates.com/pipermail/textmate/2007-June/020386.html -- I  
have white-listed your address incase you want to follow-up to the ML  
address (w/o being subscribed).


>> Though it does sound like a WP bug.
> I will post a bug report over at WP, will see if they can fix that.  
> Where can I take a look to see what exactly is being sent to the  
> server? That might help them debug it.

Looking at the diff of xmlrpc.php between 2.1.3 and 2.2, it does seem  
they broke it (or made some change I can’t really understand).

Basically when you set comments: on/yes/y/1 in TextMate then we send  
‘mt_allow_comments=open’ to WordPress (to all other systems we send  
‘mt_allow_comments=1’).

WordPress 2.2 has the following line (and 2.1.3 has something similar):

     $allow_comments = ("open" == $page->comment_status) ? 1 : 0;

So it seems they still expect us to send ‘open’ instead of ‘1’. But  
then they also have this (new for 2.2):

     $comment_status = (int) $content_struct["mt_allow_comments"];

So here they basically coerce the ‘open’ string into an integer. They  
do similar for pings. And just for the records:

     % php -r 'echo (int)"open";'
     0

I have cc’ed Joseph Scott on this letter, he is involved with the  
WordPress XML-RPC interface, so he might be able to comment as to  
whether or not this is a bug.




More information about the textmate mailing list