Page 1 of 1

XMLRPC / TextMate / Awkwardness

Posted: Fri Mar 23, 2007 12:11 am
by pilif
Hi there,

those people who use TextMate's Blogging-Bundle to maintain their Seredipity blogs may have noticed that setting the "Comments:" and "Ping:"-headers seem to have no effect (also, s9y always interprets the date sent by TM as time(0), but that's another matter I'll fix tomorrow).

I tracked the problem down to a buglet in TextMate where its blogging entry parser is unable to handle empty headers.

s9y always generates at least one empty blog property record member when entries are accessed by XML-RPC: mt_convert_breaks is always present in answers and is always empty. mt_keywords also is always there in s9y's answers but it's sometimes filled, so no problems there.

I posted a fix to the author of the blogging bundle, so we'll see a fix from TextMate I hope. But I'm still posting here to ask you:

Is it actually allowed behaviour to send empty record member? From my understanding it would make more sense to just omit the member if it's empty. I had a look at the s9y-XMLRPC-plugin and it looks kind of non-trivial to produce a quick patch, so I'm asking first and patching later :p

Anyways. With this fix to TextMate (http://www.lipfi.ch/bb_fixparser.diff and/or http://www.lipfi.ch/bb_skipempty.diff - depending on where you want to patch - have a look at the text mate mailing list archives for details), we are getting one large step closer to actually being able to blog to s9y with the help of TextMate.

Tomorrow I'll try and fix the date problem.

Philip

Re: XMLRPC / TextMate / Awkwardness

Posted: Fri Mar 23, 2007 10:17 am
by garvinhicking
Hi!

Hooray for you! Just yesterday someone had similar trouble, and I bet he'd be interested in your findings. :-)

Since responses are XML, it is perfectly "legal" to have empty member properties. In fact, many tools might bail out if the member property is not there, even though it's empty.

So IMHO the proper place to fix this is in the client part, that should ignore empty member properties and do not require a value for every field.

Best regards,
Garvin

Re: XMLRPC / TextMate / Awkwardness

Posted: Fri Mar 23, 2007 3:25 pm
by pilif
Hi Garvin,
garvinhicking wrote: Hooray for you! Just yesterday someone had similar trouble, and I bet he'd be interested in your findings. :-)
I guess that's maybe the same person that nagged me into fixing that with his comments on my blog entry about textmate (if it is: I've already sent him the patch).
garvinhicking wrote: So IMHO the proper place to fix this is in the client part, that should ignore empty member properties and do not require a value for every field.
I agree and that's why I decided to send patches to the TextMate list as oposed to this place here. It's just that I don't know the exact specification of the XML-RPC calls used to update weblogs, so it could very well have been that present-but-empty elements are forbidden there.

As today is friday and my girlfriend will be coming over, I fear I won't have time to look into fixing the post-date problem (dates transmitted by textmate are interpreted as time(0)), but I should be done with that until sunday evening. Judging from my gut-feeling, I think this time around it's s9y's fault, but I can't be sure until I checked of course.

Philip