Initial situation

  • CKeditor module 7.x-1.13
  • CKeditor 4.1
  • Panels 7.x-3.3
  • Browser: I have used Chrome and Firefox (newest versions)

Problem

If I add in a panel new content ("New custom content") the CKEditor appears for the first time. If I close the panels window and open it again, only the textarea (with no CKEditor) appears. I get in Chrome the javascript error: "Uncaught TypeError: Cannot call method 'clearCustomData' of null". But the error occurs in no particular file or line.

If I reload the complete site, the editor appears again for the first time.

In the issue queue of WoltLab a similar problem (with the same error message) was posted: https://github.com/WoltLab/com.woltlab.wcf.user/issues/153
Maybe it helps to identify the specific error.

Comments

Version:7.x-1.3» 7.x-1.13

Damn.

same here. Tried with 7.x-1.13 as well as the latest dev release. Actually, also tried with CK Editor 3.6 before that.
Funny thing is that this had been working, but I recently updated to Drupal 7.21. I have JS aggregation off, cleared caches, etc.
It also seems to happen only on certain textareas (even when I rearrange their order), and on blocks. There is nothing special or different about these textareas or the content they contain.. I tried using just very simple HTML - no difference.

Status:Active» Needs review
StatusFileSize
new537 bytes

Hi,

Try to use this patch.

Version:7.x-1.13» 7.x-1.x-dev

Status:Needs review» Reviewed & tested by the community

@k0teg this patch worked for me, thanks.

Also applied the patch from the issue jcisio linked which fixed another problem.

StatusFileSize
new11.78 KB
new19.29 KB
new36.63 KB
new15.15 KB

I've installed the patch and ckeditor disappears again.

What happens exactly: The first click on the configure ipe button on a fieldable panels pane loads the ctools modal with ckeditor. Then I click save. I reopen the pane with a click on the ipe configure button again, and the ckeditor disappears. The third time I clicked on the ipe configure button, the loading time of the pane dramatically increases.

I hope the attached screenshots help to reproduce the issue.

Installed Versions:
Drupal 7.22
Chaos tools 7.x-1.3
Panels 7.x.-3.3
Panelizer 7.x.-3.1
Panels In-Place Editor 7.x.-3.3
Fieldable Panels Pnae 7.x.-4.4
Ckeditor 7.x-1.13 / Ckeditor library version (CKEditor 3.6.6)
Media Asset 7.x-1.0-beta4

Sorry, I have not had occasion to use the patch; I had to get the editor working ASAP so I switched to the WYSIWYG module instead :(

and wysiwyg and ckeditor works fine?

The problem seems to be that Panels is trying to "destroy" the ckeditor if any exist on load. While the first time this is obviously not going to happen as none exist. However on subsequent loads when a ckeditor does exist, it tries to destroy it. However since the modal removes the ckeditor from the DOM. The CKEditor dies on the (iframe.clearCustomData) any all subsequent calls to iframe in the wysiwygarea.js plugin.

I created a issue with ckeditor https://dev.ckeditor.com/ticket/10717 but the real issue is that CKEditor instances should be removed on modal close, not on modal open.

Priority:Normal» Major
Status:Reviewed & tested by the community» Needs work

I also can confirm that the WYSIWYG module does work fine.

The patch posted above does not work, it solves half the problem (destroying the CKEditor) it however skips the clearCustomData which causes the IPE to load the same content on subsequent loads of the CKEditor.

Confirm the same behavior with Colorbox project: when the CKEditor is inside the Colorbox modal window.
A solution like in #1967990-6: "Uncaught TypeError: Cannot read property 'document' of null" error when edit custom content pane twice helped. Here is the code:

  // Support Colorbox cleanup event.
  $(document).bind('cbox_cleanup', function(event) {
    Drupal.behaviors.ckeditor.detach('#colorbox', {}, 'unload');
  });

The main problem in my opinion is that CKEDITOR.instances still stores textarea id after a window has been closed.

with the dev version of ckeditor module, this js error disapears.

#12 worked for me. I hope that the new release will be available soon.

Issue summary:View changes

Correct version number.

Issue summary:View changes

Same here... when upgrading to latest dev snapshot, the error doesn't re-appear, and CKEditor loads each time I open up the Panels modal.