After updating a customer site to latest dev version of Media and CKEditor module 1.16 (patched with https://www.drupal.org/node/2159403#comment-9518083), as well as updating the CKE library itself to version 4.4.6, we are running quite often into "too much recursion" JS errors, when trying to edit existing nodes. Unfortunately we didn't recognize this immediately, as it depends heavily on the content inside the CKEditor enabled textarea. The first time it happened on a quite big Simplenews node, having table layout and lots of images inside. Shortening the content, especially removing some images, helped.

After playing around with CKEditor and text format configuration, I've found out, that unchecking the "Plugin for inserting images from Drupal media module" resolved the problem. However, it's of course important to have the filter enabled.

Today, I've found a very simple content, only having two paragraphs, two h2 elements and an unordered list with three list items, without any inserted media. But nevertheless I also get the same error on that page. Again, when I disable the media filter, I can edit the node without any problem. See the attached sample.txt file for the source code.

I've setup a fresh installation of Drupal, with the same versions of Media, CKEditor (module + library). I can reconstruct the error there also with the simple markup from the attached file!

I'm trying to further investigate this. Currently I'm suspecting, that the following commit could have raised the problem: http://cgit.drupalcode.org/media/commit/modules/media_wysiwyg/js/media_w...

There's another issue, that may sound similar, but as far as I see, it's different to this. However, I will add it as related issue: #1266064: The media filter allows infinite recursion via media_token_to_markup()

Update

Still unsure which change could have caused the problem. Maybe some change withiin the library itself could also have to do with the problem. I can successfully insert the sample markup on another customer site with a slightly older version.

This setup works:

Again, the setup that doesn't work:

IMPORTANT UPDATE

I've just tried out CKE 4.4.7 on my test environment: first with and then without Widget plugin. Obviously Media Filter + CKE widget plugin in combination are causing the error.

But what does this mean for us? As it seems, using the widget plugin is the recommended way since #1504696: Integration with CKEditor module. So I'm worried about possible negative consequences of removing the widget plugin. Would be great to have some background on this topic. Anyone who knows more about that???

I will now try on our customer's site CKE without widget plugin. Not sure, if it's 100% necessary, but I will include the patch from #2177893: Custom wrapper breaks tokens with CKEditor >=4.0 without widget plugin

CommentFileSizeAuthor
#1 sample.txt464 bytesagoradesign
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agoradesign’s picture

FileSize
464 bytes
agoradesign’s picture

Issue summary: View changes
agoradesign’s picture

Issue summary: View changes
agoradesign’s picture

Issue summary: View changes

added more details about working and not working setups

agoradesign’s picture

rooby’s picture

I am also running into this issue when updating to latest everything (with the widget plugin).

marcoka’s picture

i have that issue too somehow.
[#810684454]
anyone found out if it works with older versions? if so which ones?

brockfanning’s picture

Project: D7 Media » Media CKEditor
Component: Media WYSIWYG » Code

There is now a separate project for integrating Media with the Ckeditor module/library (media_ckeditor) so I'm moving this over there. For what it's worth, I am using the latest versions of Media, Media Ckeditor, Ckeditor (module), and Ckeditor (library), and I haven't run into this problem. (Not to say I haven't run into other problems, though.) I suspect this may already be resolved in the newer media_ckeditor project.