I install the module as per documentation and everything seems to be fine. However when I go to make a new piece of content the editor now does not load. I get the following JS error:

Uncaught TypeError: Cannot call method 'push' of undefined

Disabling the module reverts to normal behaviour.

Comments

matthewdolman’s picture

Anyone else having this issue?

lyly_double0’s picture

I have the same problem. But I have no error in my Firefox error console... neither on the drupal log...

iva2k’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this problem. Can anyone post a link here to their site where I can see it break?

matthewdolman’s picture

The error is actually showing in Chrome console, I haven't tried Firefox

It says that the error is in editor_plugin.js line 1 I changed over to the source library and it is line 74 of editor_plugin.js that is giving the error.

ed.contentCSS.push(url + '/css/content.css');

Hope that is more helpful, I am developing locally and so unable to let you have a look at the site.

matthewdolman’s picture

Status: Postponed (maintainer needs more info) » Active
matthewdolman’s picture

Ugly as hell hack to get this working:

Change editor_plugin.js over to the source version and in the source version comment out the following lines which are at about line 74.

//if (ed.settings.content_css !== false)
// ed.contentCSS.push(url + '/css/content.css');

Now the editor works but there is no CSS? So you cant see the highlighted badly spelled words.

To fix this in the TinyMCE editor settings add in in the following CSS file:

%bsites/all/libraries/tinymce/jscripts/tiny_mce/plugins/spellchecker/css/content.css

Also for me the background of the editor is white and it seems that the highlight is also white so I changed the css in content.css to

.mceItemHiddenSpellWord {background:url(../img/wline.gif) red repeat-x bottom left; cursor:default;}

and hey presto, not ideal but a quick fix

mediumgrade’s picture

matthewdolman,

Tried your fix and, while it seemed to get the toolbar to display again, the spell checker itself does not appear to work very well. When I try to enable it, I keep getting a message box saying "error response." Most misspelled words, it will not discover. When it does, it works less than half the time. The times that it doesn't it simply says "error response" again.

Any ideas?

acb’s picture

A quick (possible) culprit.

I found this was happening when I had an apache rewrite rule rewriting from http://example.com to http://www.example.com (and vice versa). Not sure why this would be affecting it, but it was.... Removing the rule made the editor appear. Any thoughts as to how to implement a workaround?

iva2k’s picture

Status: Active » Postponed (maintainer needs more info)

Did you follow the instruction in installation section (trying a test URL on your site)?

cwyant’s picture

Same issue here.

Edit: I downloaded the latest version of TinyMCE (3.4.6) and now it works.

iva2k’s picture

Status: Postponed (maintainer needs more info) » Fixed

Feel free to reopen if you followed #10 and #9, and still have a problem.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

davyvdb’s picture

Status: Closed (fixed) » Needs work

This is indeed a bug. It can be fixed by changing one line of code in editor_plugin.js.

I'm going to explain this by showing how to fix it in the editor_plugin_src.js as code is readable there. Keep in mind that this file is not used, but editor_plugin.js (which is the compressed version).

Instead of

			if (ed.settings.content_css !== false)
				ed.contentCSS.push(url + '/css/content.css');

You should do

			if (ed.settings.content_css !== false)
				ed.settings.content_css = ed.settings.content_css + ',' + url + '/css/content.css';
iva2k’s picture

Status: Needs work » Closed (won't fix)

Fix in #13 is messing with TinyMCE spellchecker plugin, not the Drupal module. I suggest bringing it up upstream with Moxiecode, as there is no way Drupal module can patch that.

cafuego’s picture

For the record, the fix is to update your TinyMCE to a more recent version. The spellchecker plugin works fine with the current 3.5.2.