Error: tinyMCE.getEditorId is not a function

Mike Sances - January 29, 2008 - 21:13
Project:TinyMCE
Version:5.x-1.9-1
Component:Documentation
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

This may be a duplicate of the *forum* thread here but I'm unsure: http://drupal.org/node/111912

After upgrading to Drupal 5.5, the disable / enable rich-text link no longer works with the TinyMCE editor. The link is there but does not do anything. Users need to manually choose their default setting by changing TinyMCE prefs in their profile. So the editor works fine, just the toggle link.

Clicking the link will generate this error in Firefox Error Console:

Error: tinyMCE.getEditorId is not a function
Source File: http://mysite.com/node/add/blog
Line: 42

Note this didn't happen on our Drupal 5.3 sites, but once we went to 5.5 it did start to occur.

#1

dawansv - February 1, 2008 - 19:06

I had the exact same issue with TinyMCE 3.0 -- reverted back to version 2 and no longer having the problem. It must be caused by changes in version 3.0 javascript code whereas functions available in version 2 (and used by the drupal module) have been changed/renamed/removed...

#2

wdtj - February 4, 2008 - 17:07

I also am having this problem. Looks like the current TinyMCE module and TinyMCE 3 are broke.

#3

hansfn - February 7, 2008 - 20:25
Priority:normal» critical
Status:active» reviewed & tested by the community

It seems that the TinyMCE developers have changed the API. I have created a patch that makes this module work with the current TinyMCE (3.0) - see attached file.

Added: After looking at the TinyMCE migration guide, I have updated the patch - replacing tinyMCE.getInstanceById with tinyMCE.get. (The old version of the patch works.)

AttachmentSize
tinymce.module.patch - version 2 1.27 KB

#4

kle - February 8, 2008 - 02:11

And here is the patched file for "TinyMCE 5.x-1.9"

Just replace it with the older file in >modules>tinymce>tinymce.module

AttachmentSize
tinymce.module.zip 12.03 KB

#5

bazaarsoft - February 9, 2008 - 07:13

HMMMMM...

Nope. Now the error is:

Error: tinyMCE.get is not a function
Source File: http://mydomain.com/drupal/?q=node/6/edit

I have the release version of tinymce 3.0 and the patched module from above.

Any other ideas? This is a show-stopper since you can't add the < !--break--> in a story to separate the tickler from the rest of the body...

UPDATE: the error above is still happening in FireFox 2. In Safari, it worked for a while, but the editor was way too wide. After messing around with various solutions to THAT problem, it stopped working prompty as I got the width thing fixed. I have to say, I'm VERY disgusted with drupal at the moment. I'm going through all this crap just because the standard "Story" doesn't allow inline images. It's AMAZING that a CMS that's been around this long has such a fundamental flaw.

#6

fuquam - February 15, 2008 - 15:25

The editor just doesn't show up for me. I have all the permissions set right. I installed the patch. I know TinyMCE works because I have it on three other Drupal sites I've built and it works fine. I'm using a different theme on this site plus using Drupal 5.7. Could there be something with the theme or Drupal version thats not allowing the editor to show up? I wish I'd at least get an error so I knew where to start?

#7

steinmb - February 18, 2008 - 06:11

Drupal 5.7
TinyMCE module 5.x-1.9
TinyMCE 3.0
Firefox 2.0.0.12 Mac OS 10.5.1

Added the patch and the turn on/off editor button is working again. On the "Edit tinymce profile" all the Buttons is gone, in my old sites are they showing, just plain text and checkboxes, is this as designed?

--
Stein Magne

AttachmentSize
Picture 1.png 54.3 KB

#8

thepaul - February 22, 2008 - 18:21

Thanks a million hansfn!

#9

Bodo Maass - March 1, 2008 - 19:03

The patch from #3 does make TinyMCE 3.0.2.1 work with the TinyMCE.module 5.x-1.9, but only without the compressor. If I try to install the TinyMCE Compressor 2_0 I get the javascript error "o is not a constructor". So something else seems to be missing.

Also, the latest version of MCImagemanager is also not supported at all yet. So for now it seems easier to stay with TinyMCE 2.1.3 + compressor 1.1.0 + MCImageManager 2.0.

#10

dr00b - April 2, 2008 - 00:50

Tried every version/method above, all throw at least one error even if the editor loads. Does anyone have a step by step to get *any* version of tinymce working with 5.7?

#11

Bodo Maass - April 4, 2008 - 17:14

dr00b, TinyMCE 2.x should work out of the box with the TinyMCE.module 5.x-1.9. If it doesn't maybe you should try it on a clean test site first to see that it works on your system.
To get TinyMCE 3.x working with Drupal 5.7, check my comment #9 in this thread: http://drupal.org/node/182319
3.x works, but only without the PHP compressor.

#12

scor - April 12, 2008 - 15:58

I can confirm the issue and the patch #3 fixes it. It'd be nice to commit this patch so that the version 3 stable of tinymce can be used on Drupal.

#13

steinmb - April 19, 2008 - 09:02

Hi
Does anyone have a comment to my Q in #7?

--
Stein Magne

#14

scor - April 19, 2008 - 11:19

I noticed it too after installing tinyMCE 3.0.6 but didn't have time to look into it.

#15

Murz - May 13, 2008 - 13:58

Thanks for patch "tinymce.module.patch - version 2"!
Works good on Drupal 6.2 & Tinymce 3.0.8!

#16

bilevader - May 13, 2008 - 21:33

solution at post #4 worked like charm for me. thanks!

#17

ennetws - May 14, 2008 - 00:27

Thanks ! patch works perfectly.

#18

axper - June 7, 2008 - 00:07

Sorry, guys, but how should I use the 'tinymce.module.patch - version 2' ?
How can I patch it?
Using Drupal 6.2 and TinyMCE 3.0.9 with compressor, with the same problem as most of people here.

Thanks

#19

AdrianB - June 17, 2008 - 11:42

I hade the same problem (using TinyMCE 3.0.9 and Drupal 5.7).

The patched tinymce.module in #4 worked for me as well. Maybe this worth committing?

#20

steveoliver - July 17, 2008 - 19:51

Thanks. This patch works great.

#21

stevioz - September 24, 2008 - 11:54

Thanks for solution #4

#22

RobertNelsonVance - September 25, 2008 - 02:03

Patched Module file in #4 seems to be working fine.... definitely resolves the toggle issue.... haven't noticed any side effects yet.

#23

sun - October 5, 2008 - 22:54

FYI: Wysiwyg API supports TinyMCE 3.x now.

#24

Squirrelly - October 19, 2008 - 20:52

Using the patched module from #4 and working for me as well.

#25

anarchman - December 3, 2008 - 20:15

Patch in #4 did not work for me, as it returned to the problem described here: http://drupal.org/node/235972 where all that appears is a blank screen with two lines for disable rich text editor. The fix described in the linked thread fixed that problem, but then after copying the file in #4 the problem in the linked thread returns. I will now try patch in #3 to see if that works.

#26

sun - December 4, 2008 - 00:06
Status:reviewed & tested by the community» won't fix

Please look at the project page to learn how to solve this issue.

#27

anarchman - December 5, 2008 - 19:08
Component:User interface» Documentation
Status:won't fix» postponed (maintainer needs more info)

Changing this to a documentation issue. Sun, I respect the work that looks like has gone into this, but can we do a better job of describing what is going on and steps to installing a working editor. When reading the first paragraph on the project page, I see ...WYSIWYG API... and seeing API kind of makes my eyes gloss over when looking from an end-user perspective. It would seem that everything is in a big transitional state, but it's hard to make sense of what we are supposed to be doing just from looking at those paragraphs on the project page.

#28

sun - December 8, 2008 - 04:03

Hm. Well, I do not have permissions to alter TinyMCE's project page (actually, I have, but I'm basically not allowed to) - if you meant TinyMCE's project page at all?

After all, the Wysiwyg project is an API, if you happen to install it, you can use a bunch of editors with it. I can see your point though... The difference from other modules like Views, which primarily is also an API, is that Wysiwyg does nothing on its own. So you need to download one of the supported editors (according to the on-screen installation instructions) to use it.

#29

steinmb - August 13, 2009 - 13:37
Status:postponed (maintainer needs more info)» closed

Closing due to inactivity.

 
 

Drupal is a registered trademark of Dries Buytaert.