Hello,

TinyMCE v.3.5 installed here. The TinyMCE editor shows up and works beautifully; however, whenever I click the "disable rich text" link or switch the input format filter to "Plain Text" (or any format for which WYSIWYG is not enabled), the rich text editor stays there. If I then try to re-enable rich text or switch back to the "Full HTML" input format, an extra set of buttons appears in the TinyMCE editor toolbar.

I also tried this with TinyMCE v.3.4 with the same result :-/

Any ideas? The only way for me to edit the HTML source is to change to the "plain text" filter, save, then re-edit the node.

CommentFileSizeAuthor
#15 tiny_mce.txt198.67 KBdosource

Comments

marcvangend’s picture

I can confirm this bug; seeing the same behavior using Wysiwyg 7.x-2.1 together with TinyMCE 3.5b3.

In my case, reverting to TinyMCE 3.4.2 (the version I was using before I updated it) did solve the problem. Unfortunately, that version suffers from bug #1494172: TineMCE 3.3 shows an empty editor box on Mozilla Firefox 11...

Nigerrrr’s picture

I have the same problem.
Afrer switching to each non-wysiwyg text formats FireBag console get error - "t is not defined (file - ...../tinymce/jscripts/tiny_mce/tiny_mce.js)"

thebruins’s picture

I'm having the same problem, subscribing.

Castus’s picture

Same here!

twod’s picture

I've been able to reproduce this and will begin debugging ASAP. I do have a couple of urgent projects going on so if anyone else feels like taking a shot, please do!

So far I've only determined that the problem occurrs when we call the .remove() method on the TinyMCE instance when detaching the editor. For some reason that is now throwing an error inside TinyMCE itself.

Btw, there's no need for 'subscribing' comments, we have a Follow button at the top right of all issues now. ;)

thebruins’s picture

Btw, there's no need for 'subscribing' comments, we have a Follow button at the top right of all issues now. ;)

Ok, it's been a while since my last login ;-)

I think I have found it. Things go wrong on line 13518 of tiny_mce_src.js (I manually included that file for debugging purposes). It does a 't.getDoc()' but 't' is undefined within that function. If you add something like 't = this' on that line, the error disappears and enable/disabled rich-text works again.

So, not really a bug in WYSIWYG but one in TinyMCE?

thebruins’s picture

The folks over at TinyMCE are aware of this bug, see http://www.tinymce.com/develop/bugtracker_view.php?id=5136

Hopefully there'll be a new release soon.

Castus’s picture

Can someone clearly describe a safe way to get this fixed? I need this fairly quickly, sadly enough.

thebruins’s picture

Since tiny_mce.js is compressed and barely readable, you could make the required change in tiny_mce_src.js on line 13518. Add t = this . Obviously before t.getDoc().
Tiny_mce_src.js is not included by default so you'll have to add a line to your administration theme's info file to start including it.

twod’s picture

Tiny_mce_src.js is not included by default so you'll have to add a line to your administration theme's info file to start including it.

...or hack editors/tinymce.inc and replace the filename on line 55 with 'tiny_mce_src.js' so Wysiwyg loads that file instead of the compressed variant.

I don't think we can fix this in Wysiwyg. We need to be able to cleanly remove the editor when switching to another editor. If the call to remove an instance fails and it's not because we're passing the wrong parameters or calling things out of order, I don't know how to work around it. (Except for reimplementing all of that code in Wysiwyg, which is overkill.)

Considering this is already fixed in the TinyMCE repository and will be part of the official TinyMCE 3.5 release, I think all we can do is to consider TinyMCE 3.5b3 broken and wait for the 3.5 release. (The 3.4 releases still work well with Wysiwyg btw.)

thebruins’s picture

3.4 works fine, but suffers from an annoying Firefox11 bug which made me upgrade to 3.5b

IreneKraus’s picture

I'm using 3.5 of their editor and the problem is still present, contrary to the statement on their site. So, I guess I will have to notify them the bug is still there!

Update: Apparently that bug report has been closed so I created a new one here:
http://www.tinymce.com/develop/bugtracker_view.php?id=5144

thebruins’s picture

Are you using 3.5b3? That's probably a beta version of 3.5. Can't find an official 3.5 release on their website yet, the bug is probably fixed in their code but not released yet.

IreneKraus’s picture

Hummmm, didn't realize the b meant beta! Thanks for pointing that out. They're download section is a bit confusing, as that's labeled as 'everything you need for a production site.'
Okay, got what I guess it there stable release downloaded and will install that. Might fix some of the other 'oddities' I'm seeing in things too!

dosource’s picture

StatusFileSize
new198.67 KB

Correcting tiny_mce.js is not as difficult as it seems. t.getDoc() appears only once in the file.

Get modified version for TinyMCE 3.5b3 (jQuery) in attachment. Just rename to tiny_mce.js.

brenes’s picture

Thanks, the tiny_mce.txt (.js) posted in #15 solved the problem for me. It is working with tinymce 3.5b. The bug, which forced me to update to 3.5b, posted here http://drupal.org/node/1494172 disappears and disable rich text is working as well.

twod’s picture

Status: Active » Closed (won't fix)

Closing this as we can't work around it in Wysiwyg. Check #15 for an unofficial modified version if you really need TinyMCE 3.5b3.

JSCSJSCS’s picture

Thanks, it fixed the problem with the buttons not changing when changing text formats too.

bwoods’s picture

#15 worked for me as well. Thanks!