On Jun 13, 2007, at 1:23 PM, Allan Odgaard wrote:
On 11. Jun 2007, at 18:40, Joseph Scott wrote:
[...] 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’).
Ahhh, sending a value of 'open' would certainly be the issue there. Before I go doctoring this up, is there list of all the potential values that are sent for mt_allow_comments? Is it just 'open' and 'closed'?
Well, actually the “standard” is 1 or 0 -- but WordPress has been using “open” and “closed” in the past. So ideally you’d change it to accept both values, then long-term (i.e. when users are on WP 2.2 +) we can remove the special-casing for WP.
I've got a patch for this that will support 1, open, 0 and closed. I need to run it through some additional tests and then I'll get it to the wordpress.com and submit it to wordpress.org for inclusion.
[...] 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.
The above looks about right. With a little work I'm we'll be able to accommodate non-int values that are being sent, I'd like to know exactly what those are before I start adding more code though.
Btw: have a look at both NewPost and EditPost -- it seems NewPost sets comment_status to open/closed where EditPost sets it to the value of mt_allow_comments casted to an int. When using comment_status, it is tested against the string value 'open'. So regardless of value sent (for mt_allow_comments) it will always disable comments when editing a post.
My patch covers this issue as well, the two will be essentially identical.
-- Joseph Scott http://joseph.randomnetworks.com/