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)


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:
Maybe it helps to identify the specific error.

Members fund testing for the Drupal project. Drupal Association Learn more


cbeier’s picture

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


caspervoogt’s picture

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.

k0teg’s picture

Status: Active » Needs review
537 bytes
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es). View


Try to use this patch.

jcisio’s picture

Version: 7.x-1.13 » 7.x-1.x-dev
bnash2501’s picture

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.

xvendo’s picture

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

caspervoogt’s picture

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 :(

xvendo’s picture

and wysiwyg and ckeditor works fine?

dubcanada’s picture

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 but the real issue is that CKEditor instances should be removed on modal close, not on modal open.

dubcanada’s picture

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.

pingwin4eg’s picture

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.

KroKroDile’s picture

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

sjhuskey’s picture

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

sjhuskey’s picture

Issue summary: View changes

Correct version number.

joelstein’s picture

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.

wwalc’s picture

Status: Needs work » Fixed

All the recent comments suggest that the issue is gone in the latest dev version of CKEditor module, so I'm closing this. If anyone still encounter a similar problem, please reopen this ticket and provide as much details as possible.

grasmash’s picture

Status: Fixed » Active

I am still experiencing this bug on the latest version of 7.x-1.x-dev, and the patch does appear to fix it.

grasmash’s picture

Status: Active » Needs review
grasmash’s picture

Status: Needs review » Active

After some more testing, I've found that this patch introduces a bug with the rich-text toggle for CKEditor.

wwalc’s picture

@grasmash - could you provide more details? Is there any JavaScript exception in the JS console - if yes, could you paste all the available information? Does it happen in every browser? What version of panels are you using, which theme? Do you have any other non-standard setup that could potentially cause this?

grasmash’s picture


Uncaught TypeError: Cannot read property 'clearCustomData' of null 
Uncaught TypeError: Cannot read property 'document' of undefined 

Tested in Chrome. Using panels 7.x-3.4.

I'll try to gather more information.

garbo’s picture

The patch at #6 by XVENDO works for me. Now the CKEditor shows in Ctools modal popups (media upload edit popup).