WordPress spellcheck woes

Posted November 20, 2008 // Tagged as development // 5 Comments ↓

I’ve been sitting on this problem for a while now but after sitting in with a StayPress beta user and watching their workflow (which included copying and pasting to Word, Spellchecking and then pasting back into WordPress) I decided to sit down and work my way through getting the Spellcheck working on my servers.

The main reason for putting things off was the wonderfully instructive error message that was returned when the spell check button was pressed (see below). It didn’t really give me much to go on so it was going to be a case of opening the spell checker php files and walking through the code to see where things went wrong.

spellcheckwoe

But they didn’t…. After 2 hours of stepping through and the planting of “informative” messages to tell me how far processing had gotten, it turns out the spell check was actually doing it’s job quite nicely thank you very much, it just wasn’t returning the results to the browser correctly.

As a last stab in the dark, I decided to look at the headers being sent by the response and commenting some of them out to see if that made much difference.

The first line commented was line 13 in rpc.php which now reads:

//header('Content-Encoding: UTF-8');

and voila, all of a sudden the spell check started operating. Now I have no idea why my browser or server or something along the line doesn’t like UTF-8 encoding but I’ll save that for another day.

At least I have now eliminated Microsoft Word from a users work flow.

rpc.php can be found in your wp-includes/js/tinymce/plugins/spellcheck directory

5 Responses

  1. Joe Jacobs

    November 21st, 2008 at 6:57 pm

    Thanks! I’ve been having the same problem since…forever and I’ve been trying to solve it for months but I couldn’t figure it out. So is this a bug in wp or is it to do with tinymce?

  2. WordPress spell check fix | Joe Jacobs

    November 21st, 2008 at 7:16 pm

    [...] found a fix for the spellcheck error here. It was a problem with the headers sent by the script. Commenting the encoding header did the [...]

  3. Barry

    November 21st, 2008 at 8:23 pm

    @Joe Jacobs -
    I think it’s more of a tinymce thing. My initial attempts at getting it working involved downloading the latest spellchecker version from the Tinymce site and the problem remained with that version.

  4. Andrew

    February 11th, 2009 at 7:10 am

    Awesome! I have been trying to solve that for a long time! Thanks!

  5. Trace

    March 16th, 2009 at 4:02 am

    Thanks, was stuck on this too…

Leave a Reply