How to configure Windows Live Writer to work with Drupal 6

Background

After many frustrating attempts to get Windows Live Writer to play nice with the Drupal Blogapi, here is what I learned.  hopefully my experiences will save you some time and headache! I was unable to find one place on the web that contained instructions that would work for me so here is the compilation of instructions along with my own experiences in one concise how to article.

Following are the sites that I used to point me in the right direction:

http://drupal.org/node/287615 - (Some of the info in this post is outdated)

http://www.tributemedia.com/education/tutorials/windows_live_writer_and_drupal_6_client_configuration - (this is from the guy who developed the WLW Blogapi module for drupal 6)

Step 1: Prepare Drupal

To make sure drupal plays nice with WLW we will have to do the following:

  • Install the filter_default module.  This will enable the content that is posted from WLW to be posted with an input format other then filtered HTML.
  • Enable the blog module
  • OPTIONAL – install the WLW Blog API module
  • Enable the Blog API module that is included with Drupal core (or if you installed WLW Blog API module enable that instead)
  • check the permissions on your upload folder to make sure you have write access to the folder
  • Configure FTP (unless you are using the WLW Blog API module)

Install filer_default: You can find the filter_default module here. Download and untar the module to your modules folder.  To do so on a Debian based server, ssh into the server and execute the following commands:

cd /etc/drupal/6/sites/all/modules
wget http://ftp.drupal.org/files/projects/filter_default-6.x-1.x-dev.tar.gz
tar –zxvf filter_default-6.x-1.x-dev

Exit SSH session

Now go to Site building –> Modules and under Input Formats, check the box next to Filter Defaultinput_filter_module10

Now find scroll backup the modules page and find the section entitled Core-Optional.  Expand the section and check the box next to Blog and Blog API
blog_module10

OPTIONALLY you can install the WLW BlogAPI module and use that in place of the Drupal Core Blog API.  The WLW Blog API does the following that the core Drupal blog API does not:

  • allows you to create new Taxonomy terms from within WLW and have them created in Drupal automatically, 
  • post content to content types other than blog including custom content types
  • allows you to upload pictures without using FTP. One difference here is by using FTP each article’s content is uploaded to it’s own subfolder when using FTP whereas WLW Blog API adds all items to the base folder that you specify.

Other than that I have not seen any other differences.  One thing I have noticed when using WLW Blog API is that it does not appear to pull the tags that are assigned to a blog post back into WLW when you are editing a previous post.

Finally check to make sure that the permissions on your upload folder allow you write permissions.  If you installed drupal using Debian apt-get then the upload folder is located at /var/lib/drupal6/default/files/blog.

Step 2: Install Live Writer

If you have not done so yet, download and install Windows Live Writer.  You can download the program from here.

Once you have WLW installed, go ahead and start it up.  When Liver Writer starts click next and you will see this screen:
image

Select “Other blog service” and click next
image 
In the first field “Web address of your blog:” you want to enter a web address that does not work.  If you enter the actual address to your blog the setup will not work.  So just enter anything like I have done. Then enter your correct username and password and if you do not want to have to reenter your password each time you post click Remember my password.  Now click next.

If you entered a fake web address (like I said before :) ) you will see Live Writer try to find you blog and when it fails it will display this dialog:
 image
Select Movable Type API from the first dropdown and then in the second field you want to enter your domain web address and add /xmlrpc.php to the end of it.  So I would replace www.example.com with www.smoothdriving.com and then click next.

Live Writer will now connect to your blog and then it will ask you if you would like to post a temporary post so that Live Writer can download your theme.  Select yes and Live Writer will upload a temporary post (which it automatically deletes for you ) and then it will download what it needs to display you blog posts with your theme applied to them.

Step 3: Configure FTP

If you are using the Drupal core Blog API instead of the WLW Blog API, you will have to configure FTP access to be able to upload images when you post to your blog.  To this you need to start Live Writer and go to Blogs –> Edit Blog Settings… in the main menu bar.  You will see this screen:
image
On the left hand side click Pictures:
image
Select the “Upload pictures to an FTP server:” option and then click Configure FTP…
image
Fill out the information to connect to your FTP server.  The Publish pictures into this folder field in the example contains the correct path for a standard Drupal 6 install with Debian but I have added the sub folder “blog”.
The URL of picture… field should contain the complete URL needed to find the picture in a web browser. Again the example contains the directory for a standard single site Drupal installation.
Click Ok and you are all finished.

Time to write and publish your first blog article!

Troubleshooting:

If you delete a post using Drupal’s administration you may run into a problem with Live Writer giving you the following error when you try to publish the post again. ‘Server Error 1 Occurred” followed by a description of what it believes the error is.  This error can be misleading.  For example I have seen descriptions of “n/a” as well as “Invalid categories submitted". The description is misleading as there was no problem with the categories that I had included in the post the problem is caused by Live Writer not knowing the post has been deleted from Drupal’s database so instead of posting the article as a new post it tries to edit the original post.  To fix this situation do the following:

  1. Open the post in Live Writer.
  2. Go to your My Documents folder and find the folder labeled My Weblog Posts.
  3. In that folder you will find a Drafts and Recent Posts folder.  In each of those is a cache file as well as all of the posts that you have created.  Delete the cache file as well as the post that you are having an issue with (make sure you already have it open in Live Writer prior to deleting it, you could also move the file to another location to be safe).
  4. Now go back to Live Writer and copy the entire post.
  5. Open a new post and paste the original post into the new one.
  6. Now you will be able to post the newly created post to the server without an error.
  7. Once you are done close both Live Writer windows.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
14 + 5 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.