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.
It appears that the latest WYSIWYG module release (both stable and dev version) has a bug (or two to be precise) related to CKEditor. I've just tried this on a customers website, as well as on a local, default drupal installation with no other module installed other that the wysiwyg module. The bugs are independent of the CKEditor version used (tried the latest 3.5, as well as older releases such as 3.4.3 and 3.4.2).
The bugs are as follows:
- The formatting icons (bold, italic etc.) are not marked as active when used on a piece of text, hence you cannot remove the formatting once set
- The elements path at the bottom of the editor is missing
Downgrading to 6.x-2.1 solves the issues. I've attached a screenshot with an example.
Comment | File | Size | Author |
---|---|---|---|
#6 | wysiwyg-HEAD-ckeditor-isnode-followup.1009880.6.patch | 810 bytes | TwoD |
#5 | wysiwyg-2-3-ckeditor-isnode-followup.patch | 874 bytes | AndyF |
#2 | wysiwyg-HEAD-ckeditor-isnode-followup.patch | 1.27 KB | TwoD |
wysiwyg_style_elements_path_bug.png | 16.37 KB | psiska |
Comments
Comment #1
TwoDThanks for reporting.
This is a regression introduced with #748888: isNode() is not called in CKEditor, reopening that issue. To work around it, enable a Drupal plugin like Teaser Break. Note that Teaser Break will throw an error when clicked and there's no selection unless you upgrade to Wysiwyg 2.x-dev first.
Comment #2
TwoDOn second thought, fixing this here instead to get a new commit message.
Attached patch has been committed to the affected D6 and D7 branches.
The -dev snapshots will have the fixed code within a few hours and it'll be part of the next official release.
Also added an entry to the FAQ.
Thanks again for reporting!
Comment #3
TwoDComment #5
AndyF CreditAttribution: AndyF commentedHi
I still get a problem in
selectionChange
. Following the code through I think it's because I don't have any cross-editor plugins (certainlyDrupal.settings.wysiwyg.plugins[params.format].drupal
doesn't exist). I've made a simple patch that's fixed my problems.Thanks
Comment #6
TwoDHmm, when I tested it looked like
$.each(Drupal.settings.wysiwyg.plugins[params.format].drupal, ...)
would not try to iterate over an undefined.drupal
as long asDrupal.settings.wysiwyg.plugins[params.format]
is defined.But, it turns out it just throws an error instead (which CKEditor eats up, hence why it appeared to cause no problems).
This error could appear if there are native plugins active, but no cross-editor plugins.
I've committed your patch to D6 and D7 versions with a simple optimization; this callback is called very often and it takes slightly longer to call sub-objects than a local reference so every little bit counts.
Thanks for the patch!
The -dev snapshots will be rebuilt within 12 hours and the fix will be in the next official release.
Comment #7
TwoDComment #8
AndyF CreditAttribution: AndyF commentedGreat, thanks!