When using Panels and the In Place Editor, if I am editing a WYSIWYG-enabled field in the pane popup, and then click save, it gives me this JS error in the console which breaks a lot of other page JS:

Uncaught TypeError: Cannot call method 'replace' of undefined

Patch incoming.

CommentFileSizeAuthor
#1 2233917-1-tinymce-replace-error.patch716 bytesmcrittenden
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mcrittenden’s picture

TwoD’s picture

Status: Needs review » Closed (duplicate)

Thanks for the patch, but the real issue is that the attach function gets called without passing in the id of a real field. That makes it likely many other issues could arise, such as editors crashing or ending up in weird states, so we must be able to assume the id given to an editor is useful.
The 7.x-2.x-dev version has had a couple of patches applied to it which fixes a few situations where this could happen, often involving CTools Modals and other AJAXy things.

I think this particular problem could be that saving the form removes it from the document and submits it in the background, while Drupal's AJAX code still keeps a reference to the actual form DOM element (keeping the form "alive" but not actually useful).
This was worked around in #2284955: Can't close modal with latest version of WYSIWYG. If you're still experiencing this problem with the latest 7.x-2.x-dev, please reopen this issue.