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.
When going to my front page and use the "edit box" link (contextual links) to edit it. It opens up in a modal. I can alter the text and save.
The second time I try to do this, the box doesn't open in a modal, but it is loaded inline. And I get an error in the ckeditor.js. (Uncaught TypeError: Cannot read property 'document' of null).
From the third time on and every attempt after that to edit the box, it opens in a modal, but no text is loaded in the body field. When saving, the empty body field gets saved. This is very annoying. But I can't find a solution for the moment.
Any idea?
Comment | File | Size | Author |
---|---|---|---|
#2 | boxes-ckeditor_detach-1844544-2.patch | 964 bytes | mariancalinro |
#1 | Screen Shot 2012-11-19 at 12.24.10.png | 51.05 KB | phoenix |
Screen Shot 2012-11-19 at 11.45.16.png | 37.3 KB | phoenix |
Comments
Comment #1
phoenix CreditAttribution: phoenix commentedI tried it again. And this time I got pointed to Drupal.behaviors.textarea.
Check it out here:
Comment #2
mariancalinro CreditAttribution: mariancalinro commentedI had the same problem using boxes with CKEDITOR.
The CKEDITOR instances are not destroyed when the dialog is closed, so when then next dialog opens, CKEDITOR tries to destroy the existing instances that will be replaced. As the nodes ar no longer in the DOM, the destroy operation will fail.
The fix was to search for CKEDITOR instances inside the dialog when closing it, and to destroy them before the dialog and the content is destroyed.
Patch attached, please test and review.
Comment #2.0
mariancalinro CreditAttribution: mariancalinro commentedUpdated issue summary.
Comment #3
ZoeN CreditAttribution: ZoeN commentedI have this problem. The patch doesn't fix it, for me, alas.
Comment #4
tylersamples CreditAttribution: tylersamples commentedThe patched worked for me.
Comment #5
mariancalinro CreditAttribution: mariancalinro at Dream Production commentedUnassigning myself, this was by mistake.