Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have two issues, probably related. I'm using the WYSIWYG module with TinyMCE in my case -- the latest version of TinyMCE, 3.5.7. My default input format is Full HTML, but that and Filtered HTML both are configured to use TinyMCE. If I switch from Full to Filtered, everything is fine. If I switch back, the whole textarea disappears and will not come back until page refresh.
In addition, I get a Javascript console error on pageload -- though it does not recur even when switching formats. That error is:
Uncaught TypeError: Cannot read property 'configs' of undefined wysiwyg.js:28
Drupal.wysiwygInit wysiwyg.js:28
b.extend.each jquery.js:33
Drupal.wysiwygInit wysiwyg.js:26
(anonymous function) wysiwyg.js:274
(anonymous function)
Comment | File | Size | Author |
---|---|---|---|
#10 | wysiwyg-tinymce-invisible.179482.10.patch | 582 bytes | TwoD |
#5 | wysiwyg-tinymce-invisible.179482.5.patch | 510 bytes | TwoD |
Comments
Comment #1
Georgii CreditAttribution: Georgii commentedHi! I have the same issue reproduced with the same version of TinyMCE (3.5.7) and in the latest release of this module 7.x-2.2
Just a couple of notes:
Comment #2
TwoD@Offlein, that sounds like a problem with Drupal's settings object. Could you try inspecting the JavaScript object in
Drupal.settings.wysiwyg
and see if it looks complete?There should be a 'configs' property in there, with a sub-objects keyed by the names of enabled editors, holding settings objects in turn keyed by the formats they've been assigned to.
@Georgii, do you by any chance have the old tinymce.module enabled as well? If so, please disable it.
Do you have any modules enabled that use JavaScript on the node edit forms or alter them in any way?
Comment #3
Offlein CreditAttribution: Offlein commentedHello,
Apparently, that warning is no longer appearing for whatever reason. The disappearing text input remains, however. (For what it's worth, I do not have any old tinymce.module enabled either.)
It seems that, more specifically, the textarea will only disappear if the user switches from one TinyMCE format to another -- like what Georgii says. I have 4 formats: "Filtered HTML" "Full HTML", "Plaintext" and "Email" (also a plaintext format) If I switch to one of the plaintext formats the textarea will be there (or return if it was gone), and will convert properly back into a TinyMCE textarea when switching to Filtered or Full.
The only thing that causes the textarea to disappear is a switch from Filtered to Full or vice-versa.
Comment #4
Georgii CreditAttribution: Georgii commented@TwoD
No tinymce.module and I was reproducing the issue on a /comment/*/edit page where the only standard set of JS is included
Please take a look at my e-mail I send to you via contact form. You can find information about how to reproduce the issue there.
Comment #5
TwoDI've traced this down to a problem in TinyMCE itself.
There was an issue with IE9 crashing if there was no content in the editor when it was removed.
They applied a patch that delayed the hiding of the editor elements using a
setTimeout()
call:.
A commenter in the original TinyMCE thread noted that this fix also hid new editor instances after replacing an old instance, much like we do in Wysiwyg.
This lead to another patch:
That patch has not yet made it into an official TinyMCE release, but can be tested using the nightly TinyMCE builds. The last patch seems to have fixed the issue without hiding the new editor instance.
I've made a simple patch to force TinyMCE to be shown again if this version is detected.
Comment #6
TwoDForgot the status.
Comment #7
sunShouldn't this be >= or <=?
Comment #8
TwoDIf I'm not mistaken, the patch introducing the issue was added in 3.5.7, and the patch fixing it will be part of 3.5.8 since it's already in the nightly build. I'm on my phone right now, so I can't verify it.
Comment #9
Offlein CreditAttribution: Offlein commentedGreat success!
Comment #10
TwoDI've confirmed the fix is only needed for TinyMCE 3.5.7.
The hide delay causing the issue was introduced between 3.5.6 and 3.5.7:
Between 3.5.7 and the current HEAD, they've reverted that change and done it differently, without a delay.
The log confirms that as well:
The bug we're seeing was reported as http://www.tinymce.com/develop/bugtracker_view.php?id=5510 so I've added a reference to it in the patch and committed it to D6 and D7 branches.
Thank you all for reporting, reviewing and testing. The -dev snapshots will be updated within 12hrs and this patch will be part of the next release.