Home > Blog > Fix Windows Live Writer Issue with WordPress

Fix Windows Live Writer Issue with WordPress

April 30th, 2009 Leave a comment Go to comments

I have always been using Windows Live Writer (WLW) in writing my blogs and cross posting them to both WordPress site www.ningzhang.org and Blogger site blog.ningzhang.org, very convenient. Yesterday I ran into issues opening and posting to my WordPress site using Windows Live Writer: got an error dialog saying

Invalid Server Response – The response to the metaWeblog.newMediaObject method received from the blog server was invalid

I searched the web, tried a few things, and fixed the issue pretty quickly. Share my findings here in hope it may be helpful for others run into similar problems.

Windows Live Writer Log

WLW has pretty good log. Open Help->About Windows Live Writer menu item:

Windows Live Writer Help->About menu item

You will see the About dialog, click the Show log file link:

WLW About Windows

the folder “%localappdata%\Windows Live Writer” will pop up, which contains “Windows Live Writer.log” file. I copied relevant error log below. Pretty good stack trace, very helpful for debugging and diagnosing :-)

WindowsLiveWriter,1.7696,Fail,00031,30-Apr-2009 01:28:58.595,"WindowsLive.Writer.Extensibility.BlogClient.BlogClientInvalidServerResponseException: Invalid Server Response - The response to the metaWeblog.newMediaObject method received from the blog server was invalid:

Invalid response document returned from XmlRpc server
   at WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.CallMethod(String methodName, XmlRpcValue[] parameters)
   at WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.DoBeforePublishUploadWork(IFileUploadContext uploadContext)
   at WindowsLive.Writer.PostEditor.WeblogBlogFileUploader.DoUploadWorkBeforePublish(IFileUploadContext uploadContext)
   at WindowsLive.Writer.PostEditor.BlogPostReferenceFixer.FileUploadWorker.DoUploadWork(String fileReference, BlogFileUploader fileUploader, Boolean isWindowsLiveLightboxCloneEnabled)
   at WindowsLive.Writer.PostEditor.BlogPostReferenceFixer.LocalFileTransformer.Transform(BeginTag tag, String reference)
   at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.LocalFileReferenceFixupFilter.FixReferences(BeginTag tag, String reference)
   at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.OnBeginTag(BeginTag tag)
   at WindowsLive.Writer.CoreServices.LightWeightHTMLDocumentIterator.Parse()
   at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.FixReferences(TextWriter output, ReferenceFixer referenceFixer, ReferenceFixedCallback referenceFixed)
   at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.FixReferences(String html, ReferenceFixer fixer, ReferenceFixedCallback referenceFixed)
   at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.FixLocalFileReferences(String html, ReferenceFixer fixer, ReferenceFixedCallback referenceFixed)
   at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.FixLocalFileReferences(String html, ReferenceFixer fixer)
   at WindowsLive.Writer.PostEditor.UpdateWeblogAsyncOperation.LocalSupportingFileUploader.UploadFilesBeforePublish()
   at WindowsLive.Writer.PostEditor.UpdateWeblogAsyncOperation.DoWork()
   at WindowsLive.Writer.CoreServices.AsyncOperation.InternalStart()","   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at WindowsLive.Writer.CoreServices.Diagnostics.LogFileTraceListener.Fail(String message)
   at System.Diagnostics.TraceInternal.Fail(String message)
   at System.Diagnostics.Trace.Fail(String message)
   at WindowsLive.Writer.PostEditor.BlogPostEditingManager.UpdateWeblog(Boolean publish)
   at WindowsLive.Writer.PostEditor.BlogPostEditingManager.PostToWeblog(Boolean publish)
   at WindowsLive.Writer.PostEditor.BlogPostEditingManager.PublishAsDraft()
   at WindowsLive.Writer.PostEditor.PostEditorMainControl.commandPostAsDraft_Execute(Object sender, EventArgs e)
   at WindowsLive.Writer.ApplicationFramework.Command.RaiseEvent(Object eventKey, EventArgs e)
   at WindowsLive.Writer.ApplicationFramework.Command.OnExecute(EventArgs e)
   at WindowsLive.Writer.ApplicationFramework.CommandOwnerDrawMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItem.MenuItemData.Execute()
   at System.Windows.Forms.Command.Invoke()
   at System.Windows.Forms.Command.DispatchID(Int32 id)
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at WindowsLive.Writer.ApplicationFramework.ApplicationForm.WndProc(Message& m)
   at WindowsLive.Writer.ApplicationFramework.SatelliteApplicationForm.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.NativeWindow.WndProc(Message& m)
   at WindowsLive.Writer.PostEditor.ImageInsertion.InsertImageDialog.ThumbnailReadinessListener.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.NativeWindow.WndProc(Message& m)
   at WindowsLive.Writer.PostEditor.ImageInsertion.InsertImageDialog.ThumbnailReadinessListener.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.NativeWindow.WndProc(Message& m)
   at WindowsLive.Writer.PostEditor.ImageInsertion.InsertImageDialog.ThumbnailReadinessListener.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.NativeWindow.WndProc(Message& m)
   at WindowsLive.Writer.PostEditor.ImageInsertion.InsertImageDialog.ThumbnailReadinessListener.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.NativeWindow.WndProc(Message& m)
   at WindowsLive.Writer.PostEditor.ImageInsertion.InsertImageDialog.ThumbnailReadinessListener.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.NativeWindow.WndProc(Message& m)
   at WindowsLive.Writer.PostEditor.ImageInsertion.InsertImageDialog.ThumbnailReadinessListener.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.NativeWindow.WndProc(Message& m)
   at WindowsLive.Writer.PostEditor.ImageInsertion.InsertImageDialog.ThumbnailReadinessListener.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at WindowsLive.Writer.ApplicationFramework.SatelliteApplicationForm.Launcher.ThreadMain(Object[] parameters)
   at WindowsLive.Writer.CoreServices.Threading.ThreadStartWithParams.Run()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()"

It is the Gold Star Rating Plugin!

Since WLW has always worked fine with my WordPress site till now, so I suspect it is some recent changes on my WordPress site, and most likely recent plugin updates, so I tried deactivating plugins one by one. I was lucky! Since I knew what plugins I updated lately, so I first deactivated Gold Start Rating plugin and then use WLW to open and post, and it worked!

 

Updates

2009-05-05

I ran into this error again while publishing a post from Windows Live Writer:

Invalid Server Response

Windows Live Writer log shows similar error message and call stack as before. I opened error_log under the top directory of my WordPress site, it has something like this:

05-May-2009 08:10:59] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 865469 bytes) in /[deleted]/wp-includes/class-IXR.php on line 242

and line 242 of class-IXR.php is the second line below:

case 'base64':
    $value = base64_decode( trim( $this->_currentTagContents ) );
    $valueFlag = true;
    break;

So it looks like it ran out of memory while base64_decode an image. I removed the largest image in my post, post draft to blog, and it succeeded. I then edited the draft from WordPress web UI, select Add an Image from computer and insert it to post:

Add an Image from computer

and it succeeded.

I don’t really know WordPress or PHP as a developer, so if anyone know how to raise this better, please let me know. A general novice user approach seems:

  • post draft to server frequently to pinpoint the troublemaker image while you are authoring
  • upload and insert the image to post from WordPress web UI

Share and Enjoy:

  • Print
  • email
  • RSS
  • Twitter
  • TwitThis
  • del.icio.us
  • LinkedIn
  • Technorati
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • QQ书签
Categories: Blog Tags: ,
  1. No comments yet.
  1. No trackbacks yet.