I'm using Drupal 6.6 and just updated to using version 6.x-0.5 of wysiwyg with TinyMCE 3.2.1.1. I have it setup to display the rich-text editor by default.

When I open a create content page that uses the wysiwyg editor, if I click on the "Disable rich-text" link, the editor switches back to the normal textarea; however, if I then try to click on the "Enable rich-text" link, it remains stuck on the textarea and doesn't switch back to TinyMCE.

Firebug reports that "element is undefined" on the following code:
var classes = element.className.split(' ');
in wysiwyg.js at line 158.

The javascript error occurs regardless of whether I'm using Firefox 3 or IE 7.

CommentFileSizeAuthor
#4 wysiwyg-HEAD.one-format.patch1.49 KBsun
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

igwk’s picture

Interestingly enough, the rich-text editor can be disabled and re-enabled just fine as long as the user is logged in as the admin user. If the user is anonymous or authenticated (but not admin), the wysiwyg editor cannot be re-enabled.

sun’s picture

Component: Editor - TinyMCE » Code
Priority: Normal » Critical

True, confirming. This bug occurs when only one input format is available to the user. getParams(), when invoked by AttachToggleLink(), seems to be unable to find the input format element (a DIV in this case) to parse the parameters from.

sun’s picture

Title: Can't re-enable rich-text editor after disabling » Editor cannot be re-enabled with one input format only

Better title.

sun’s picture

Status: Active » Fixed
FileSize
1.49 KB

Committed attached patch to all branches.

Status: Fixed » Closed (fixed)

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

livingegg’s picture

Thanks for this patch it worked perfectly. Just an FYI, but it was not included in the 5.x-0.5 version of wysiwyg.