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

bugz_nz - May 17, 2006 - 20:12

Worked fine for me with no problems at all.

Works on My Site

Fidelis - May 17, 2006 - 20:21

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

Jay Daverth - May 17, 2006 - 21:07

I installed the plugin from TinyMCE, but is there a seperate plugin for the spellchecker from drupal?

TinyMCE INSTALL.txt

Fidelis - May 17, 2006 - 23:31

Copy & paste from the TinyMCE INSTALL.txt file (see step 7):

INSTALLATION:
********************************************************************

NOTE: During this installation process you'll be asked to also
install the official TinyMCE package from
tinymce.moxiecode.com.

1. Place the entire tinymce directory into your Drupal modules/
directory.

2. Download TinyMCE 2.0 from

http://tinymce.moxiecode.com/

Remember to uncompress the file and make sure the folder is named
'tinymce'.

3. Place the entire 'tinymce' engine folder inside your modules/tinymce
directory. So the TinyMCE engine will live in modules/tinymce/tinymce

4. Enable this module by navigating to:

administer > modules

*note - all database tables will be automatically created during this step

5. Setup role based tinymce profiles via

administer > settings > tinymce

6. To boost the performance of TinyMCE, download the "TinyMCE compressor" from:

http://tinymce.moxiecode.com/download.php

Place the tiny_mce_gzip.php file in

modules/tinymce/tinymce/jscripts/tiny_mce

7. To use AJAX spell checking, download the spellchecker plugin:
(note: this requires TinyMCE 2.0.6+)

http://tinymce.moxiecode.com/download.php

Extract this file to

modules/tinymce/tinymce/jscripts/tiny_mce/plugins/

Then edit config.php in plugins/spellchecker/:

Uncomment this line and comment out all other require_once's:

require_once("classes/TinyGoogleSpell.class.php"); // Google web service

Set this to true:

$spellCheckerConfig['enabled'] = true;

Enable spellchecker in TinyMCE settings page, under "buttons and plugins"

Create new content as a role that has TinyMCE permissions and see TinyMCE in
action!

patrick

Humm . . .

t4him - June 27, 2006 - 15:10

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

jraper@groups.d... - May 22, 2006 - 20:17

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

solanas - June 19, 2006 - 17:14

I always get no spelling errors.

I have Drupal 4.7.2 and Debian.

I enabled the internal PHP

brashquido - June 20, 2006 - 00:30

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

brashquido - June 13, 2006 - 07:25

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

brashquido - June 13, 2006 - 23:34

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 14
PHP 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 14
PHP 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

brashquido - June 16, 2006 - 01:46

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

duntuk - July 13, 2006 - 08:02

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

duntuk - July 13, 2006 - 08:09

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.

mxc4 - June 24, 2006 - 11:47

Any progress on this bug. Its a major annoyance :(

www.jumpingbean.co.za
www,cyberdesigns.co.za

Nothing yet by the looks.

brashquido - June 25, 2006 - 23:03

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...

brashquido - July 13, 2006 - 11:16

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

prokopton - September 11, 2006 - 08:20

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

dsnoeck - May 15, 2007 - 13:15

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

 
 

Drupal is a registered trademark of Dries Buytaert.