I recently turned up a bug that causes all CKEditor fields to remain blank. This only happens with more recent versions of jQuery. The one that D6 core ships with does not suffer from this problem, so this shouldn't impact everyone. However, the behavior is still wrong, so it wouldn't be bad to fix it for everyone. ;)
The root cause is that "theme" JS setting is included once for every CKEditor field rendered on the page request. When the page loads, the AJAX requests get sent off to send the text through the XSS filter. The version of jQuery that ships with core incorrectly formats the request parameters such that it will be interpreted as a single string. However, later versions of jQuery are actually able to send the array in the AJAX calls to the XSS filter. One of the first checks that the XSS filter does is to check whether $_POST['theme'] is a string, and so it fails and the CKEditor fields remain blank.
In ckeditor_process_textarea(), there is a static variable that keeps certain JS from being included more than once. The theme setting should be included in that protected area also.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | ckeditor-newer-jquery-2335105-1.patch | 1000 bytes | kevin.dutra |
Comments
Comment #1
kevin.dutra commentedHere's a patch that would fix this issue.
Comment #2
sosguthorpe commentedRan up against this issue. One thing that is worth noting is that this issue only happens if you have multiple CKEditor instances running on one screen.
Your patch solves it for me thanks!
Comment #3
jenlamptonThanks for the patch. It looks like this patch doesn't apply to the 1.x-dev version of the ckeditor module, as there is no
ckeditor_process_textareafunction anymore. I'm running into the same problem but will seek a different solution.