Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#36977 closed defect (bug) (fixed)

TinyMCE: error when "media" is not loaded

Reported by: azaozz Owned by: azaozz
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords:
Focuses: Cc:


When the TinyMCE 'wpview' plugin is loaded (default), and the rest of the media scripts are not, and another script uses the namespace wp.mce, there is an error Cannot read property * of undefined....

Change History (4)

This ticket was mentioned in Slack in #core-editor by azaozz. View the logs.

4 years ago

#2 @azaozz
4 years ago

Happens because we don't check for the existence of wp.mce.views in the TinyMCE plugin, only for wp.mce.

#3 @azaozz
4 years ago

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

In 37597:

TinyMCE: check if wp.mce.views exists before loading the wpview plugin. Fixes a js error when the rest of the media scripts are not loaded.

Fixes #36977.

#4 @LewisCowles
4 years ago

What would be the effect of a noop view?

I still get an error with this patched into the latest stable, but the wp_editor loads the content. I'm more concerned that this only deals with part of a larger issue, which is that there are situations where built-in functionality doesn't operate or conflicts with other Automattic plugins, like Jetpack

Note: See TracTickets for help on using tickets.