Spellchecker in TinMCE not working in Drupal
Jay Daverth - May 17, 2006 - 18:16
Has anyone gotten the TinyMCE spellchecker plugin to work with drupal? The TinyMCE support page has no more advice for me, so I wonder if it is a drupal problem. I'm using the google check and have done all the changes written in the drupal TinyMCE module install readme. But I still get an error message that says: Could not execute AJAX call, server didn't return a valid XML.
I've already made the changes recommended from the TinyMCE forum, which seems to have helped others, but not me.
Any ideas?

Worked fine for me with no
Worked fine for me with no problems at all.
Works on My Site
Try registering yourself an account (you do not need to become a member for this) at http://gov20.info and try it out...
I followed the instructions that came with the TinyMCE Module. I'm using Drupal 4.7. Please note that the spellchecker requires the installation of a distinct plugin.
patrick
Thanks for the reply
I installed the plugin from TinyMCE, but is there a seperate plugin for the spellchecker from drupal?
TinyMCE INSTALL.txt
Copy & paste from the TinyMCE INSTALL.txt file (see step 7):
patrick
Humm . . .
I registered and edited forum post. I entered the text;
Now is the time for all good men to come to the aid of their country.
I mispelled 'on-purpose' the word 'time' as 'tme'.
The spell checker returned no mispelled words.
- - - - -
I think the concerns posted below/above are legit. I followed the instructions to the tee, No-Joy.
Patrick,
Can you please share, steps, how you installed it. Also might want to check out above mispelling,
Or ? ? ? Maybe I just don't get it.
Thanks for the help,
t4him
Ajax Spellchecker doesn't seem to work in IE
In my installation (4.7), the Ajax Spellchecker works like a charm in Firefox, but not in IE6. In IE, it always reports no spelling errors no matter what.
The same here
I always get no spelling errors.
I have Drupal 4.7.2 and Debian.
I enabled the internal PHP
I enabled the internal PHP spell checker on my working production server last week to speed up the checking process, and I now get this "no spelling errors" message too even with incorrect spelling. What's worse is that even if I switch back to using the Google service I get this error. Seems this Spellchecker module needs a lot more TLC before being production stable. This is a TinyMCE thing though, not Drupal it would seem as there are a lot of people not using Drupal getting it also.
----------------
Dominic Ryan
www.it-hq.org
I did have TinyMCE and
I did have TinyMCE and Spellchecker working with IE and Firefox on my old 4.7.0 system, but I've just done a fresh install of Drupal 4.7.2, TinyMCE 4.7, TinyMCE 2.0.6.1 and Specllchecker 1.01 and am not having any luck. I've double checked my Spellchecker settings as per install instructions in TinyMCE, and they look fine;
<?php
$spellCheckerConfig = array();
// Spellchecker class use
// require_once("classes/TinyPspellShell.class.php"); // Command line pspell
require_once("classes/TinyGoogleSpell.class.php"); // Google web service
// require_once("classes/TinyPspell.class.php"); // Internal PHP version
// General settings
$spellCheckerConfig['enabled'] = true;
// Default settings
$spellCheckerConfig['default.language'] = 'en';
$spellCheckerConfig['default.mode'] = PSPELL_FAST;
// Normaly not required to configure
$spellCheckerConfig['default.spelling'] = "";
$spellCheckerConfig['default.jargon'] = "";
$spellCheckerConfig['default.encoding'] = "";
// Pspell shell specific settings
$spellCheckerConfig['tinypspellshell.aspell'] = '/usr/bin/aspell';
$spellCheckerConfig['tinypspellshell.tmp'] = '/tmp';
?>
I've also made sure Spellchecker is enabled in the Drupal TinyMCE settings, but when I goto check spelling in Firefox no errors are found and IE throws up a "Could not execute AJAX call, server didn't return valid a XML" error. I've found similar reports on the TinyMCE plugin forums here and here. I have tested this across Apache 2 and IIS 5.1 with the same result.
----------------
Dominic Ryan
www.it-hq.org
I've got it working....sort of
I tested the newest versions of TinyMCE and Spellchecker (2.0.6.1 and 1.0.1 respectively) using the Google web service (same as above) on a clean Drupal 4.7.2 install on my Windows 2003 Server running IIS 6 and it works in both IE and Firefox. With that in mind it would seem that perhaps Spellchecker is very environment sensitive. Only large differences I can see between my server which is working, and my test system which isn't, is operating system (W2K3 Server Vs Win XP Pro), Webserver (IIS 6 Vs IIS 5.1) and PHP version (4.3.11 Vs 4.4.1).
However, looking at my PHP error log on my test system I did notice it was full of these Spellchecker related messages;
PHP Notice: Use of undefined constant PSPELL_FAST - assumed 'PSPELL_FAST' in X:\spellchecker\config.php on line 14PHP Notice: Undefined index: mode in X:\spellchecker\tinyspell.php on line 36
PHP Notice: Undefined index: spelling in X:\spellchecker\tinyspell.php on line 37
PHP Notice: Undefined index: jargon in X:\spellchecker\tinyspell.php on line 38
PHP Notice: Undefined index: encoding in X:\spellchecker\tinyspell.php on line 39
PHP Notice: Undefined index: sg in X:\spellchecker\tinyspell.php on line 40
PHP Notice: Undefined property: errorMsg in X:\spellchecker\tinyspell.php on line 86
Had a bit more of a search on the TinyMCE forums, and found this thread, which says to try replacing lines 34~40 (inclusive) in tinyspell.php with this code;
$cmd = @sanitize($_POST['cmd']);$lang = @sanitize($_POST['lang'], "strict");
$mode = @sanitize($_POST['mode'], "strict");
$spelling = @sanitize($_POST['spelling'], "strict");
$jargon = @sanitize($_POST['jargon'], "strict");
$encoding = @sanitize($_POST['encoding'], "strict");
$sg = @sanitize($_POST['sg'], "bool");
I did that, but Spellchecker still doesn't work. However it has reduced the number of Spellchecker related messages in my PHP error log. The only Spellchecker related messages I have there now are;
PHP Notice: Use of undefined constant PSPELL_FAST - assumed 'PSPELL_FAST' in X:\spellchecker\config.php on line 14PHP Notice: Undefined property: errorMsg in X:\spellchecker\tinyspell.php on line 85
This makes sense as all the code changes are meant to do is santize the returned XML so that it isn't full of PHP notices.
----------------
Dominic Ryan
www.it-hq.org
For those interested I've
For those interested I've logged this as a bug for TinyMCE at Sourceforge.
----------------
Dominic Ryan
www.it-hq.org
appears to be added to the
appears to be added to the core plugins and suppose to be fixed in the TinyMCE 2.0.6.1 (development/source) (tinymce_2_0_6_1_dev.zip) ... so i'm guessing you no longer need to download the plugin seperately
nope... even with the latest
nope... even with the latest version 2.0.6.1 dev, it still doesn't work with google... oh well...
Any progress on this bug.
Any progress on this bug. Its a major annoyance :(
www.jumpingbean.co.za
www,cyberdesigns.co.za
Nothing yet by the looks.
Nothing yet by the looks. Just be aware though that this is a problem that appears to be specifically with the TinyMCE Spellchecker plugin, not the Drupal TinyMCE module.
----------------
Dominic Ryan
www.it-hq.org
This is now fixed, but...
You'll need to goto this thread on the TinyMCE forums for details, and also to get these two patches;
http://sourceforge.net/tracker/?group_id=103281&atid=738747
http://silenceisdefeat.org/~mrrena/tinyspell.zip
Alternatively if you turn off display errors in PHP.ini it should also work. What is happening from my understanding is that PHP error/warning/notice messages (depending on your PHP.ini settings) were being outputted with the XML, making it invalid. Patching should fix the problem, where turning of the error display should just hide them.
----------------
Dominic Ryan
www.it-hq.org
I downloaded the code from
I downloaded the code from http://tinymce.moxiecode.com/ and 2 things happened:
--I got it to work
--I didn't get it to work.
I got it to work when I implemented spellcheck live on my host provider (Linux, Apache 1.3x, Php 4.4, MySQL 4.x). The installation was smooth and it caught every spelling error.
I didn't get it to work on my local system (Windows XP, Apache 2.x, PHP 4.x, MYSQL 4.x).
I'm thinking it might not be the spellcheck module or TinyMCE but with the settings of some system, as some Drupalers have noted. I've only been using Drupal for 2 weeks so there could be other factors I'm not aware of.
The last version of the
The last version of the spellchecker (v1.0.4) works fine for me, both on my server and my local system. Before that, spellchecker worked only on my local system !
You just need to turn to "true" the line 10 of the config.php file:
$spellCheckerConfig['enabled'] = true;Cheers,
Damien
----------------
Keep Open Spirit