Drupal 6.0 RC4 and MarsEdit

Saturday, 9. February 2008

Drupal 6.0 RC4 was released yesterday and I downloaded it and took it for a spin. The good news is that the problems I reported here and here have been fixed.

The bad news is that after installing it and running the update I could not post a new blog entry with MarsEdit 2. When I tried to post a test message I received this error dialog:


The problem is related to the “Blog ID” that is configured in MarsEdit's blog settings and the way Drupal handles that blog ID:


When MarsEdit auto-detects the blog ID it gets a value of “1”. For Drupal 6.0 RC3 and prior the blogapi.module was mapping the blog ID to a content type. A blog ID of “1” mapped to a content type of “blog”. Starting with RC4 that mapping was removed. RC4 treats the blog ID and the content type as synonomous. This was causing the function _blogapi_validate_blogid to fail because it was trying to validate that the current user had permissions to publish a content type of “1” but the content type should actually be “blog” instead.

The fix for this is to change the blog ID in MarsEdit to “blog” as shown here:


Changing the blog ID to “blog” allows posting and does not appear to have any negative side affects.

Update: Apparently the change was intentional in Drupal and the issue persists in versions 6.0 and 6.1. All of the functions in blogapi.module that need a blog ID are expecting a blog ID of “blog” now. Daniel Jalkut of Red Sweater Software pointed out the the incorrect blog ID is being returned by Drupal's RSD function. This is causing any blogging software that uses RSD for auto-discovery to get the wrong blog ID which in turn causes the problems described earlier in this post. The blog ID is hardcoded to “1” in blogapi.modules's RSD function. I submitted a patch to change the blog ID returned by the RSD function in blogapi.module to “blog” so that RSD auto-discovery will work correctly with MarsEdit and hopefully other blogging clients as well. You can also view and download the patch here.

Share 'Drupal 6.0 RC4 and MarsEdit' on Delicious Share 'Drupal 6.0 RC4 and MarsEdit' on Facebook Share 'Drupal 6.0 RC4 and MarsEdit' on Google Buzz Share 'Drupal 6.0 RC4 and MarsEdit' on Google Reader Share 'Drupal 6.0 RC4 and MarsEdit' on LinkedIn Share 'Drupal 6.0 RC4 and MarsEdit' on Email