#44134 closed task (blessed) (fixed)
Update to TinyMCE 4.7.13
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.9.8 | Priority: | normal |
| Severity: | normal | Version: | 5.1 |
| Component: | TinyMCE | Keywords: | needs-testing fixed-major |
| Focuses: | Cc: |
Description
WordPress 4.9.6 updated TinyMCE to 4.7.11, but since that ticket was opened two more TinyMCE releases became available.
TinyMCE 4.7.12 and 4.7.13 fixes an additional 20 issues (+/-).
Attachments (1)
Change History (33)
#1
@
8 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
- Type changed from defect (bug) to task (blessed)
#2
@
8 years ago
There is a bug report for one of the fixed issues: https://wordpress.org/support/topic/error-with-saving-page-content-tmce-4-7-11-wp-4-9-6-with-avada-theme/.
#4
@
8 years ago
- Milestone changed from Future Release to 4.9.7
And another bug that is fixed in TinyMCE 4.7.13: https://wordpress.org/support/topic/table-bug-with-edge-plugin-needs-update-to-4-7-13/.
Moving to 4.9.7.
This ticket was mentioned in Slack in #core by azaozz. View the logs.
8 years ago
#6
@
8 years ago
I'm also seeing a TypeError: tinymce.ui.Control is undefined that isn't present in WP 4.9.5.
My TinyMCE plugin JavaScript is https://gist.github.com/danielbachhuber/7994605866299c57e2d9f9bac021f423
#9
@
8 years ago
I get the following issue after updating
https://wordpress.stackexchange.com/questions/304462/wordpress-tinymce-editor-broken-and-nothing-seems-to-fix-it/304467#304467
#11
follow-up:
↓ 12
@
8 years ago
I also get the same issue as @danielbachhuber with tinymce.ui.Control not working. When I debug the tinymce.ui I get only factory functions and nothing else.
#14
@
8 years ago
- Keywords reporter-feedback added
@danielbachhuber @bdanzer29 confirmed that tinymce.ui.Control is not available before TinyMCE is initialized. This seems to be a change in TinyMCE 4.7.0 and is the same in TinyMCE 4.7.13.
However in my testing the theme seems to always be loaded and initialized first, before the plugins (at least in the default editors in WP, the main editor and the Text widget).
I'm not sure if this will be "fixed" upstream. Also not sure why your plugins are running before TinyMCE and the theme are initialized. Please add any additional info on how to reproduce this, if possible.
#15
@
8 years ago
@azaozz I'm simply registering this GitHub Gist with the following:
public static function filter_mce_external_plugins( $plugins ) {
$assets_path = dirname( dirname( __FILE__ ) ) . '/assets';
$assets_url = plugins_url( 'assets', __DIR__ );
$filepath = '/js/tinymce-plugin.js';
$mtime = filemtime( $assets_path . $filepath );
$plugins['tastylinks'] = $assets_url . $filepath . '?v=' . (int) $mtime;
return $plugins;
}
My TinyMCE plugin closely parallels wplink, so I'm not sure why wplink works and my TinyMCE plugin doesn't.
(function(tinymce){
tinymce.ui.Factory.add( 'WPTastyLinkPreview', tinymce.ui.Control.extend( {
vs.
( function( tinymce ) {
tinymce.ui.Factory.add( 'WPLinkPreview', tinymce.ui.Control.extend( {
#16
@
8 years ago
I am registering my script through mce_external_plugins filter.
<?php add_filter('mce_external_plugins', function ($plugin_array) { $plugin_array['lorem'] = Assets::get_plugin_url().Assets::get_asset('js', 'lorem'); $plugin_array['lorem2'] = Assets::get_plugin_url().Assets::get_asset('js', 'lorem2'); return $plugin_array; });
#17
@
8 years ago
Think I found the problem. @danielbachhuber @bdanzer29 can you see if 44134-test.diff fixes it for you? It removes the "old" way of loading external plugins that doesn't seem needed any more.
#18
@
8 years ago
@azaozz When I remove that code it does work for me! Thanks for the help! Do you have any idea when 4.9.7 might be released?
#19
follow-up:
↓ 21
@
8 years ago
- Keywords reporter-feedback removed
@azaozz Yes, 44134-test.diff fixes the issue for me.
#20
follow-up:
↓ 22
@
8 years ago
I came across a breaking change caused by 4.7. It's teeny tiny and can be fixed with a single line of code, but it's a break nevertheless. Made the mistake of posting this to #43862 which is closed (I'm rusty with Trac etiquette).
Before, when you added a lister to the SetupEditor event, like so:
tinymce.on( 'SetupEditor', function( editor ) {
// Do stuff with the editor that's been setup
} );
The callback was passed the editor instance directly. Now though, in 4.7, it is instead passed an event object containing the instance:
tinymce.on( 'SetupEditor', function( e ) {
var editor = e.editor;
// Do stuff with the editor that's been setup
} );
Any code that uses the former method will cause errors to be thrown due to trying to access properties and methods that don't exist on the event object. The most apparent effect to the end user is that the Visual tab in the editor appears blank, and you cant switch to/back to Visual view if you're on or switch to Text view.
Thankfully, this is an easy fix, and can be made backwards compatible with var editor = e.editor || e;
What's concerning is I didn't spot any mention of the change in TinyMCE's change log, beyond a fix to their own Compat3x plugin to account for it.
#21
in reply to:
↑ 19
@
8 years ago
Replying to danielbachhuber:
Created #44330 and patched it there.
#22
in reply to:
↑ 20
;
follow-up:
↓ 23
@
8 years ago
Replying to dougwollison:
I came across a breaking change caused by 4.7. It's teeny tiny and can be fixed with a single line of code, but it's a break nevertheless.
Yeah, this is a change (normalization) upstream. All custom events in TinyMCE pass an event object with several properties, the editor instance is one of them. I'm afraid we can't do anything about it.
#23
in reply to:
↑ 22
@
8 years ago
Replying to azaozz:
Replying to dougwollison:
I came across a breaking change caused by 4.7. It's teeny tiny and can be fixed with a single line of code, but it's a break nevertheless.
Yeah, this is a change (normalization) upstream. All custom events in TinyMCE pass an event object with several properties, the editor instance is one of them. I'm afraid we can't do anything about it.
I understand, and like I said it's not a daunting task to patch my code. I was just pointing out the issue, since this kinda came out of nowhere in what's usually an auto-update minor release of WP, instead of being in a major release.
#24
@
8 years ago
- Milestone changed from 4.9.7 to 4.9.8
4.9.7 has been released, moving to next milestone.
#25
@
8 years ago
- Summary changed from Update to TinyMCE 4.7.13 to Update to TinyMCE 4.7.13 --- EDIT: or 4.8.0
TinyMCE 4.8.0 has been released today.
Any reason to not upgrade to 4.8.0, rather than 4.7.13?
This ticket was mentioned in Slack in #core by joshuawold. View the logs.
8 years ago
#27
@
8 years ago
- Summary changed from Update to TinyMCE 4.7.13 --- EDIT: or 4.8.0 to Update to TinyMCE 4.7.13
Yeah, TinyMCE 4.8 was released few days ago. Can update straight to it instead of 4.7.x.
#28
@
8 years ago
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
In 43447:
A list of commits since 4.7.11.
In summary:
Version 4.7.13 (2018-05-16) Fixed a bug where Edge 17 wouldn't be able to select images or tables. #TINY-1679 Fixed issue where whitespace wasn't preserved when the editor was initialized on pre elements. #TINY-1649 Fixed a bug with the fontselect dropdowns throwing an error if the editor was hidden in Firefox. #TINY-1664 Fixed a bug where it wasn't possible to merge table cells on IE 11. #TINY-1671 Fixed a bug where textcolor wasn't applying properly on IE 11 in some situations. #TINY-1663 Fixed a bug where the justifyfull command state wasn't working correctly. #TINY-1677 Fixed a bug where the styles wasn't updated correctly when resizing some tables. #TINY-1668 Added missing code menu item from the default menu config. #TINY-1648 Added new align button for combining the separate align buttons into a menu button. #TINY-1652 Version 4.7.12 (2018-05-03) Added an option to filter out image svg data urls. Added support for html5 details and summary elements. Changed so the mce-abs-layout-item css rule targets html instead of body. Patch contributed by nazar-pc. Fixed a bug where the "read" step on the mobile theme was still present on android mobile browsers. Fixed a bug where all images in the editor document would reload on any editor change. Fixed a bug with the Table Plugin where ObjectResized event wasn't being triggered on column resize. Fixed so the selection is set to the first suitable caret position after editor.setContent called. Fixed so links with xlink:href attributes are filtered correctly to prevent XSS. Fixed a bug on IE11 where pasting content into an inline editor initialized on a heading element would create new editable elements. Fixed a bug where readonly mode would not work as expected when the editor contained contentEditable=true elements. Fixed a bug where the Link Plugin would throw an error when used together with the webcomponents polyfill. Patch contributed by 4esnog. Fixed a bug where the "Powered by TinyMCE" branding link would break on XHTML pages. Patch contributed by tistre. Fixed a bug where the same id would be used in the blobcache for all pasted images. Patch contributed by thorn0.