Ecto and Drupal

Posted on May 12 2008 in Computing

A few weeks ago I read a brief but interesting article by Jeff Whatcott on Getting Ecto Set Up with Drupal. I had heard of Ecto in passing but had never really looked into using it. With all the hubbub around WYSIWYG tools for Drupal and the like recently, I wondered if a good desktop application would be a viable solution, so I figured I'd give Ecto a try for myself.

I was initially very impressed with the relatively simple interface sported by Ecto. After quickly configuring the blog_api module on Drupal and just a few clicks in Ecto I had connected to my Drupal blog and was presented with a list of the blog posts already published. I explored the various configurations and was pleased to find a lot of configuration options -- this isn't just a handy app, Adriaan Tijsseling has done a fine job putting together a fully-featured application workspace.

I decided that I owed Ecto at least a couple blog posts to see if I could use it effectively on my Drupal installation found at jbenner.net. I set about writing my first post with Ecto, and was very comfortable at first, typing away and easily setting basic font styles, adding links, and breaking paragraphs. I was a little confused by the interface to select "Categories" and "Tags" -- as I was entirely sure how they translated into my Drupal environment.

I published the post, then went to my site to check it out. For the most part, things looked okay... there were a few minor formatting things here and there that most likely resulted from oversights on my part while preparing the post. The problems came in when I started inspecting the post in more detail. First, Ecto didn't seem to set my topic tags at all -- for future reference, ignore Ecto's tags, and just use Categories.

Also, I use the pathauto module to automate Drupal's path aliases -- but posting using Drupal's blog_api seems to go right around pathauto. From a Drupal developer's perspective, this will probably make some sense, as I imagine that pathauto does its magic with a combination of hook_form_alter() and hook_nodeapi(). Does blog_api skip various hooks? This might be worth more investigation.

Add to this Drupal's lack of proper time zone handling and you get a rather confusing set of configurations between Drupal and Ecto to get both Ecto and Drupal to show the same (and correct) time. I eventually got a pair of settings that seemed to almost work properly, but the journey was ripe with confusion and lacked a satisfying end. In fairness, I think this may be a shortcoming of Drupal, though I'm not entirely sure in this instance.

Ecto has an option to set the input format to use when it sends the post to Drupal; however, it did not seem to set this correctly in every case. I don't know what was causing the difference in behavior in different instances, but this is an issue worthy of note.

As a note -- don't touch Ecto's summary feature if you're using it to post to Drupal. For some reason, it sends Ecto into a spiral of arguing with Drupal over the contents of your post, and seems to always end up adding what it wants your summary to be at the beginning of your post with broken HTML. You're better either setting your break tag manually in the HTML or creating a custom HTML tag in Ecto and inserting it that way.

Overall, Ecto did a fair job of posting. However, between skipping pathauto and the time zone issues, I can't see myself using Ecto regularly, as I'd find myself in Drupal's node form fixing things up anyway. More importantly, Ecto doesn't really simplify the process of posting blog entries in general, though it does offer some nice tools for performing more advanced blog actions, such as integrating images, or Amazon and Flickr resources. If anything, I could see myself using Ecto to write drafts and performing cleanup and publishing in the web interface. This might especially be handy if I want to start a post while offline.

I don't see myself encouraging any clients to use Ecto with Drupal at this point. I want to emphasize, however, that this isn't necessarily because of problems with Ecto as much as some problems between Ecto and Drupal.