Make WordPress Core

Opened 13 months ago

Closed 9 months ago

Last modified 8 months ago

#41124 closed defect (bug) (fixed)

TinyMCE popup doesn't works with latest release

Reported by: UmeshSingla Owned by:
Milestone: 5.0 Priority: normal
Severity: normal Version: 4.8
Component: TinyMCE Keywords:
Focuses: Cc:


I'm using TinyMCE popup for a custom plugin, with latest WordPress 4.8, it throws a error. https://monosnap.com/file/3vlSZSNz47BObS8KfSKKvaTOzYH3Yw.png

I dig in deeper, and found out, the changes in https://core.trac.wordpress.org/changeset/40583 https://build.trac.wordpress.org/changeset/40453/, are causing the issue.

https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce/tiny_mce_popup.js#L56 https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce/utils/mctabs.js#L15

dom and util are loaded directly and not as plugins, and hence when createInstance is called in https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce/plugins/compat3x/plugin.js#L284, tinymce is unable to resolve the Classnames and it throws the above error.

The fix is to revert the path to tinymce.util.Dispatcher and tinymce.dom.DOMUtils

I couldn't locate the use of these at other places in core, so not sure, if that's gonna break something else. But I did test the regular text editor in WordPress and TinyMCE Advance plugin, they both worked fine with the changes.

Attachments (1)

41124.diff (1.1 KB) - added by UmeshSingla 13 months ago.
Updated dom and util path for tinymce

Download all attachments as: .zip

Change History (7)

13 months ago

Updated dom and util path for tinymce

#1 @azaozz
13 months ago

  • Milestone changed from Awaiting Review to 4.9

This was fixed upstream and will be in the next TinyMCE update. Can also add it i the next dot update as it is in an external TinyMCE plugin. See: https://github.com/tinymce/tinymce/commit/5949e57cf91f6d397ccb663f7255f50e743cab24.

However this functionality (tinymce-popup.js) is a left over/compatibility mode for TinyMCE 3.x that was last used in WordPress 3.8. It will be much better to update your plugin to not use such outdated APIs.

Last edited 13 months ago by azaozz (previous) (diff)

This ticket was mentioned in Slack in #core by melchoyce. View the logs.

9 months ago

#4 @melchoyce
9 months ago

  • Milestone changed from 4.9 to 4.9.1

#5 @iseulde
9 months ago

  • Resolution set to fixed
  • Status changed from new to closed

This was fixed upstream in TinyMCE 4.6.7 and is included in WordPress with [41604].

#6 @johnbillion
8 months ago

  • Milestone changed from 4.9.1 to 5.0
Note: See TracTickets for help on using tickets.