If you use the the "Kitchen Sink" TinyMCE plug-in with custom, non-Panopoly input formats, the WYSIWYG editor spits out JavaScript errors and causes the related fields to not show up, becoming uneditable.
This is a particular problem for old sites that upgraded to Panopoly, in which the old Input Formats mimic the Panopoly WYSIWYG editor for consistency.
Steps to reproduce:
1) Install Panopoly.
2) Create a new 'full HTML' input format.
3) Assign TinyMCE to be the input format's WYSIWYG editor.
4) Copy the settings from the "WYSIWYG" format's editor.
5) Create a new node.
6) Switch the body's input to use the new 'full HTML' format.
Comment | File | Size | Author |
---|---|---|---|
#7 | panopoly_wysiwyg-breaks-ckeditor-2058917-7.patch | 696 bytes | dsnopek |
#6 | panopoly_wysiwyg-breaks-ckeditor_2058917-1.patch | 738 bytes | scottalan |
Comments
Comment #1
lsolesen CreditAttribution: lsolesen commentedCould you test with latest dev.
Comment #2
jdearie CreditAttribution: jdearie commentedI was able to reproduce this issue using the steps provided. I was working on 7.x-1.6 on a fresh Panopoly distro. On a Mac, using Chrome, I don't see any javascript errors, but the entire body field does disappear.
Switching back to the Panopoly WYSIWYG format does not correct the problem - but switching to the HTML format and then the Panopoly WYSIWYG does bring the body field back.
After removing the Kitchen Sink plug-in from the new custom format removed the problem.
Comment #4
dsnopekI've committed a change which will prevent user created formats that enable the 'Kitchen Sink' plugin to at least not error out, by disabling the plugin if the additional configuration necessary for the plugin is missing.
However, if you want your text format to have the same configuration as Panopoly's, you can implement an extra hook in your module like this:
The above API function was added in #1846322: Switching between TinyMCE text formats causes textarea to disappear
It'd be great to have some automated tests for user created text formats, so we can stop breaking this. :-) I've created a new issue for that: #2334373: Write Behat tests to make sure that user created text formats and WYSIWYG profiles work
Comment #6
scottalan CreditAttribution: scottalan commentedThis broke a custom text format for me that I'm using ckeditor in.
The culprit:
Here's a patch that makes sure we are dealing with TinyMCE. It fixes the broken editor for me and doesn't have any repercussions that have been stated here and https://www.drupal.org/node/1846322.
Not sure if this is way off base but had to get something done due to the fact I have updated our production sites due to the latest Security release for Drupal core and Panopoly 1.13 broke our editors.
Let me know what you think
Comment #7
dsnopekHrm! We seem never able to win on this issue. :-/
Here is an alternative patch that will skip that entire code block if the editor is not TinyMCE. Can you test it and let me know if it works for you? This is a big enough deal that I'll probably make a release once we have a fix.
Again, it would be awesome to get some automated tests for custom text formats so we can stop breaking this: #2334373: Write Behat tests to make sure that user created text formats and WYSIWYG profiles work
Comment #8
scottalan CreditAttribution: scottalan commentedI've tested this and it seems to be fine. Thanks
Comment #9
dsnopekThanks! I've committed it and will think about doing a release soon-ish.
Comment #11
dsnopekNot sure how this got unmarked as Fixed. :-/
Comment #13
g3r4 CreditAttribution: g3r4 commentedPatch posted on comment #7 worked for me. Thanks