Problem

CKEditor does not load into textarea when the field is populated with content.

Possible solutions

  • disable WYSIWYG module
  • clear caches (Drupal cache, Memcache, Varnish, etc.)
  • check jQuery version compatibility with CKEditor or other loaded scripts
  • turn off all or part of ModSecurity

Original report

When editing the Body field in content pages, the CKEditor does not appear if there is previous content in the field.
For example; I start a new Basic Page; save it (published or unpublished); come back later to revise the material; no CKEditor on the field.
If I select Edit Summary (which is empty) the editor appears on that field.
If I cut the text, save the work, come back to edit, the editor is there.
This happens on all installed themes (I checked, thinking it might have been a theme related problem as there can often be).
It happens in both Waterfox/Firefox and IE 11.
I have not been able to find any similar report in this database.

Comments

QBMan’s picture

Another check of this behavior. If I go to previous work (editor missing), cut the text from the field, click preview, the editor shows up on the empty field after the preview. When I paste, then preview, the editor is gone. It should also be noted that the HTML

tags show up and there is often and &nbsp added before the closing tag.

The editor code is 4.4.0 full.

QBMan’s picture

I may have solved this. It seems the existence of WYSIWYG, even though not enabled and uninstalled, confuses CKEditor. After deleting the module folder and clearing caches, CKEditor seems to be working fine on fields that already contain content.

rwilson0429’s picture

Exact same problem here. Ckeditor does not show up when editing content where textarea field already contains content.

When adding new content, ckeditor toolbar shows up for textarea fields as configured. However, when the node is saved and then edited, the ckeditor does not show up for the textarea field. Only text and html code is displayed.

I'm using the cdn (//cdn.ckeditor.com/4.4.3/full-all) as the path to ckeditor. So, I downloaded and configured the 4.4.7 version of ckeditor to run from sites/all/libraries/ckeditor. Problem persisted. This behavior begin happening all of a sudden without me making any configuration changes on the site. This is a multi-site with shared code base and this problem pops up for all of the sites.

I do not have the WYSIWYG module installed, so the solution in #2 does not help.

Update:Finally got Ckeditor appearing again. Wish I could pin-point the resolution but, all I did was to disable the following modules: Metag (and all its sub-modules, HTML Purifier, Search (core), Media WYSIWYG, XML Sitemap (and all its sub-modules). I set "config.extraPlugins = '';" in the ckeditor.congfig.js file. I flush the cache a few times and the editor reappeared for textareas with existing content.

I re-enabled the previous disabled modules one at a time. The ckeditor continued to display after all of the modules were re-enabled. I really suspect that the core Search module somehow was the culprit in my case. It was the last module that I had enabled before the problem began. Plus, the problem goes away when I disable the Search module on my other sites that are sharing this same code base.

Update #2:
After a couple of months of everything working fine with ckeditor, I re-enabled the Search module and the problem returned. This time instead of just disabling the search module, I change the admin theme specific jquery update from version 1.7 to 1.5. That fixed it for me.

aDarkling’s picture

I suppose these two issues have resolved themselves but for future reference, please include any messages that appeared in your browser's Javascript console. CKEditor is a JS-heavy module, so usually that's where the exact nature of the problem will be reported.

It's also be great if you could verify that you did clear Drupal cache, any Memcache/Varnish/whatever in your system, and browser cache.

othermachines’s picture

Just wanted to note that I've had this happen due to ModSecurity.

bobburns’s picture

I am not able to get CKEditor to show up either AT ALL. Upgraded from D6 to D7 - and put in the new module of course and the Status report sees it installed - 4.4.7. No WSYWIG module

Here is the "browser's Javascript console" output

Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1:0
Loading mixed (insecure) display content "http://ad.linksynergy.com/fs-bin/show?id=jsQryMkKxGU&bids=256827.11&type..." on a secure page[Learn More] bigbay4bestbuys.com
TypeError: $.browser is undefined script.js:13:0
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. jquery.min.js:5:0
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1:0
TypeError: $.browser is undefined script.js:13:0
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1:0
TypeError: $.browser is undefined script.js:13:0
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. jquery.min.js:5:0

I have no idea what it really means - except it appears to be saying CKEditor does not want to load on a https page

The ModSecurity issue is a thought

othermachines’s picture

@bobburns -

TypeError: $.browser is undefined script.js:13:0

The .browser call was removed in jQuery 1.9. Did you update your plugins?

bobburns’s picture

NO - do you mean CKEditor plug-ins or JQuery ??

It matters not as I was running JQuery 1.10.2 - and using D7's admin/config/development/jquery_update I set the JQuery to Drupal's default instead of 1.10 - andf so you were right JQuery 1.10 was the problem it appears

It came up

FIXED

othermachines’s picture

Issue summary: View changes
Issue tags: -no editor for previous content, -body field missing editor

Updating OP for clarity, deleting improper tags