WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#36545 closed defect (bug) (fixed)

WordPress TinyMCE toolbar/tabs unresponsive in Chrome Version 50.0.2661.75 beta-m (64-bit)

Reported by: doncullen Owned by: azaozz
Milestone: 4.5.1 Priority: normal
Severity: normal Version: 4.5
Component: TinyMCE Keywords: needs-testing
Focuses: Cc:

Description

I'm using Chrome version 50.0.2661.75 beta-m (64-bit). Updated to WordPress 4.5, noticed TinyMCE was no longer working correctly.

I can't click on 'Text' to edit source code. I'm unable to use any of the toolbar options. Clicking on 'Text' tab or clicking on the toolbar options result in this error (as seen via console):

wp-tinymce.php?c=1&ver=4308-20160323:12
Uncaught TypeError: Cannot read property 'ownerDocument' of undefined

Clicking on the link for wp-tinymce.php as given by console brings this up:

var n = e.activeEditor;
                    n && t.target.ownerDocument == document && (n.selection && t.target != n.getBody() && (n.selection.lastFocusBookmark = c(n.dom, n.lastRng)),
                    t.target == document.body || d(t.target) || e.focusedEditor != n || (n.fire("blur", {
                        focusedEditor: null
                    }),

With this particular text t.target.ownerDocument == document being highlighted.

I've tried reinstalling WP 4.5 along with all plugins being disabled, still the same problem.

Checked my other blog, runs off its own copy (I have two installations, each on separate servers) -- same problem here.

I went in WP-Admin using incognito mode (to ensure all browser extensions were disabled), disabled all WordPress extensions, then tried again to use TinyMCE. Still the same problem.

Opened Firefox, tried again to use it, works fine, interestingly. Also works fine in Microsoft Edge (Microsoft's new browser for Windows 10).

I then went to other sites via Chrome and tried using TinyMCE (outside of WordPress), TinyMCE works fine like a charm. So it's only within WordPress that it breaks.

Regressed WordPress's copy of TinyMCE to the WP 4.4.1 version, as I recall it was working fine on that version. It still didn't work, same error. So now I'm starting to think it was Chrome that updated and broke whatever WordPress TinyMCE needed to rely on to be able to work. Since it works fine on Firefox, I'm guessing it's a browser issue.

My working theory: something changed in Chrome or WordPress (or even both) that broke both abilities to work together. Of course, I'm no programming guru, so I'll leave the theories to you gurus.

I also filed a bug report with the Google Chrome team via 'Help->Report Issue', they however did not provide a link to the bug report so I'm unable to post it here.

For now, I'll just use Firefox to use WordPress Admin and Chrome for everything else.

Attachments (1)

36545.patch (984.0 KB) - added by azaozz 2 years ago.

Download all attachments as: .zip

Change History (38)

#1 @joshf
2 years ago

I have the same issue here. Vanilla WordPress 4.5 in Chrome 50.0.2661.75 beta-m (64-bit).

When I attempt to switch to the Text editor, I receive:

tinymce.min.js?ver=4308-20160323:11
Uncaught TypeError: Cannot read property 'ownerDocument' of undefined`

Works fine in Firefox 45.0.2.

#2 follow-up: @azaozz
2 years ago

  • Keywords needs-testing added

@doncullen: welcome to trac and thanks for the detailed bug report!

Testing in both Chrome 49 and 50 (50.0.2661.75 m) on Windows 7, can't reproduce. Both reports are for Chrome 50.0.2661.75 beta-m so it's possible this was fixed in the stable release (that came out couple of days ago).

The error points to TinyMCE's FocusManager: https://github.com/tinymce/tinymce/blob/master/js/tinymce/classes/FocusManager.js#L194-L216. There was a recent fix to that code as well: https://github.com/tinymce/tinymce/commit/544e9ff5482c8bab166bdf19dc45cbb7987547de.

This fix, and TinyMCE 4.3.10 didn't make it in WordPress 4.5 as we were in RC at the time. However if the above bug is confirmed fixed there we should update TinyMCE in 4.5.1.

Would appreciate more testing preferably in Chrome 50.0.2661.75 m on both Mac and PC.

Last edited 2 years ago by azaozz (previous) (diff)

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


2 years ago

#4 @christophherr
2 years ago

I just updated to Chrome 50.0.2661.75 m (64-bit) on Windows 10 and checked two websites running WordPress 4.5.

I had no problems on new or existing posts and pages and no console errors.

#5 @afercia
2 years ago

Tested on Mac (WordPress 4.5 stable on VVV) Chrome 50.0.2661.75 and Windows 10 (WordPress 4.5 zip release) Chrome 50.0.2661.75 m and couldn't reproduce.

#6 @afercia
2 years ago

  • Keywords reporter-feedback added

@doncullen do you have any Chrome extensions installed? Sometimes (rarely) they can cause JS errors.

#7 @SergeyBiryukov
2 years ago

  • Summary changed from Wordpress TinyMCE toolbar/tabs unresponsive in Chrome Version 50.0.2661.75 beta-m (64-bit) to WordPress TinyMCE toolbar/tabs unresponsive in Chrome Version 50.0.2661.75 beta-m (64-bit)

#8 follow-up: @joshf
2 years ago

By vanilla, I mean a new install, Twenty Sixteen, no active plugins. Running Windows 7 and Chrome 50.0.2661.75 beta-m (64-bit).

I actually received the TypeError when performing any TinyMCE action in the Visual Editor.

However, it does appear to be an issue with TinyMCE 4.3.8. I replaced it with the latest (4.3.10) and everything works as expected.

#9 in reply to: ↑ 8 @azaozz
2 years ago

Replying to joshf:

Running Windows 7 and Chrome 50.0.2661.75 beta-m (64-bit).

Could you try in Chrome Version 50.0.2661.75 m non-beta. Looks like this is fixed there.

#10 @swissspidy
2 years ago

I got the same error using version 50.0.2661.75 (64-bit) when adding a link and then trying to use the tab key to navigate inside the link dialog. Even when disabling all plugins and using incognito mode. To reproduce:

  1. Edit a post
  2. Press Cmd+K
  3. Press tab

Notice tinymce.js?ver=4308-20160323:38446 Uncaught TypeError: Cannot read property 'ownerDocument' of undefined in the console.

The error is in tinymce.js:

// Check if focus is moved to an element outside the active editor by checking if the target node
			// isn't within the body of the activeEditor nor a UI element such as a dialog child control
			if (!documentFocusInHandler) {
				documentFocusInHandler = function(e) {
					var activeEditor = editorManager.activeEditor;

					if (activeEditor && e.target.ownerDocument == document) {

So definitely a bug in TinyMCE itself, though I haven't tested with the most recent version of it.

#11 @swissspidy
2 years ago

I can confirm that it works using the latest version of TinyMCE (4.3.10 as of writing). As we're updating TinyMCE frequently anyway, it shouldn't be a big deal to fix this.

#12 @azaozz
2 years ago

Still can't reproduce it on three different computers, strange... Will update TinyMCE to 4.3.10.

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


2 years ago

#14 @azaozz
2 years ago

  • Milestone changed from Awaiting Review to 4.5.1

@azaozz
2 years ago

#15 @azaozz
2 years ago

In 36545.patch: update to TinyMCE 4.3.10 where this bug is fixed.

#16 @azaozz
2 years ago

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

In 37242:

TinyMCE: update to 4.3.10, changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt. Fixes #36545 for trunk.

#17 @azaozz
2 years ago

  • Keywords reporter-feedback removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for 4.5.1.

#18 in reply to: ↑ 2 ; follow-up: @doncullen
2 years ago

I'm not sure why you're unable to reproduce, @azaozz ; but as you mentioned, it may be due to the issue being in the beta and having been resolved in the stable. Although @swissspidy's attempts seem to indicate that likely may not resolve the matter.

In any case, I'd be happy to update my copy of TinyMCE in my installation of WordPress if you can let me know what the best way to do that would be. I can apply the update and see if that resolves the issue.

@afercia - indeed, I do have Chrome extensions, but I also tried it under Incognito mode to rule out that possibility (see original post), which usually disables all extensions, and still ran into the same error.

Last edited 2 years ago by doncullen (previous) (diff)

#19 @doncullen
2 years ago

Update: I downloaded TinyMCE 4.3.10's tinymce.min.js file from here: http://download.ephox.com/tinymce/community/tinymce_4.3.10.zip?_ga=1.88246235.1725777744.1460749905

Then I replaced my copy of tinymce.min.js with the 4.3.10 version, and tried again with Chrome. The TinyMCE interface was mostly responsive this time, and did not give any errors in the console. The 'Visual' tab however was disabled, and left it only editable in text mode.

Edit: also wanted to add that 'Disable the visual editor when writing' option in my profile is NOT checked, so it should be enabled. I tried disabling it, then enabling it in incognito mode to see if that'd "reset" the interface for TinyMCE, no difference. Visual mode is still nonfunctional.

It's an improvement, but still not wholly fixed. I will try switching over to the stable version and see if I can reproduce the issue. I don't have the stable version installed, but will install it in the morning.

Last edited 2 years ago by doncullen (previous) (diff)

#20 @programmin
2 years ago

On Ubuntu 14.04, Chrome 50.0.2661.75 beta (64-bit) and 4.5.1-alpha-37187 I do not see the issue (I tried 2 different themes, disabling plugins, same working behavior).

Could this bug be related to certain content within your posts that cause Chrome/MCE glitch?

#21 in reply to: ↑ 18 ; follow-ups: @azaozz
2 years ago

Replying to doncullen:

I'd be happy to update my copy of TinyMCE in my installation of WordPress if you can let me know what the best way to do that would be.

Right. In production TinyMCE is loaded differently than the rest of the JS. Best way to try 4.3.10 is to replace wp-tinymce.js.gz with the latest version from here: https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce and NOT have SCRIPT_DEBUG set in your wp-config.php (or set to false).

Then make sure to empty the browser cache and refresh the page after loading few times. Can also change the $tinymce_version string in wp-includes/version.php to help with cache busting.

#22 in reply to: ↑ 21 ; follow-up: @webmasteral
2 years ago

Replying to azaozz:

Replying to doncullen:

I'd be happy to update my copy of TinyMCE in my installation of WordPress if you can let me know what the best way to do that would be.

Right. In production TinyMCE is loaded differently than the rest of the JS. Best way to try 4.3.10 is to replace wp-tinymce.js.gz with the latest version from here: https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce and NOT have SCRIPT_DEBUG set in your wp-config.php (or set to false).

Then make sure to empty the browser cache and refresh the page after loading few times. Can also change the $tinymce_version string in wp-includes/version.php to help with cache busting.

After trying your fix the problem was still present in a vanilla WP install on both Chrome (50.0.2661.75) and Firefox (45.0.2). Chrome console error log for tinymce.min.js vr 4.3.10 showed the following

tinymce.min.js?ver=4310-20160412:11 Uncaught TypeError: c is not a constructor 
tinymce.min.js?ver=4310-20160412:11 Uncaught TypeError: Cannot read property 'body' of undefined

Inside tinymce.min.js

theme=new c(t,D.urls[n.theme]),t.theme.init&&t.theme.init(t,D.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""),t.$)):t.theme=n.theme),P(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,h=/^[0-9\.]+(|px)$/i,h.test(""+i)&&(i=Math.max(parseInt(i,10),100)),h.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&P(H(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();if(t.iframeHTML=n.doctype+"<html><head>",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+='<base href="'+t.documentBaseURI.getURI()+'" />'),!w.caretAfter&&n.ie7_compat&&(t.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),t.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',!/#$/.test(document.location.href))for(p=0;p<t.contentCSS.length;p++){var g=t.contentCSS[p];t.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+E._addCacheSuffix(g)+'" />',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),n.content_security_policy&&(t.iframeHTML+='<meta http-equiv="Content-Security-Policy" content="'+n.content_security_policy+'" />'),t.iframeHTML+='</head><body id="'+d+'" class="mce-content-body '+f+'" data-id="'+t.id+'"><br></body></html>';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&w.ie&&w.ie<12&&(u=v);var y=B.create("iframe",{id:t.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}});if(y.onload=function(){y.onload=null,t.fire("load")},B.setAttrib(y,"src",u||'javascript:""'),t.contentAreaContainer=l.iframeContainer,t.iframeElement=y,s=B.add(l.iframeContainer,y),V)try{t.getDoc()}catch(b){s.src=u=v}l.editorContainer&&(B.get(l.editorContainer).style.display=t.orgDisplay,t.hidden=B.isHidden(l.editorContainer)),t.getElement().style.display="none",B.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,r=n.settings,s=n.getElement(),h=n.getDoc(),p,m;r.inline||(n.getElement().style.visibility=n.orgVisibility),t||r.content_editable||(h.open(),h.write(n.iframeHTML),h.close()),r.content_editable&&(n.on("remove",function(){var e=this.getBody();B.removeClass(e,"mce-content-body"),B.removeClass(e,"mce-edit-focus"),B.setAttrib(e,"contentEditable",null)}),B.addClass(s,"mce-content-body"),n.contentDocument=h=r.content_document||document,n.contentWindow=r.content_window||window,n.bodyElement=s,r.content_document=r.content_window=null,r.root_name=s.nodeName.toLowerCase()),p=n.getBody(),p.disabled=!0,n.readonly=r.readonly,n.readonly||(n.inline&&"static"==B.getStyle(p,"position",!0)&&(p.style.position="relative"),p.contentEditable=n.getParam("content_editable_state",!0)),p.disabled=!1,n.editorUpload=new T(n),n.schema=new b(r),n.dom=new e(h,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:n.inline?n.getBody():null,collect:r.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new C(r,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)if(i=e[r],a=i.attr(t),s="data-mce-"+t,!i.attributes.map[s]){if(0===a.indexOf("data:")||0===a.indexOf("blob:"))continue;"style"===t?(a=o.serializeStyle(o.parseStyle(a),i.name),a.length||(a=null),i.attr(s,a),i.attr(t,a)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name))}}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("type")||"no/type",0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,r,i=n.schema.getNonEmptyElements();t--;)r=e[t],r.isEmpty(i)&&(r.append(new o("br",1)).shortEnded=!0)}),n.serializer=new a(r,n),n.selection=new l(n.dom,n.getWin(),n.serializer,n),n.formatter=new c(n),n.undoManager=new u(n),n.forceBlocks=new f(n),n.enterKey=new d(n),n._nodeChangeDispatcher=new i(n),n._selectionOverrides=new R(n),n.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(h.body.spellcheck=!1,B.setAttrib(p,"spellcheck","false")),n.fire("PostRender"),n.quirks=new x(n),r.directionality&&(p.dir=r.directionality),r.nowrap&&(p.style.whiteSpace="nowrap"),r.protect&&n.on("BeforeSetContent",function(e){P(r.protect,function(t){e.content=e.content.replace(t,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),r.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.on("compositionstart compositionend",function(e){n.composing="compositionstart"===e.type}),n.contentStyles.length>0&&(m="",P(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),P(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),r.auto_focus&&N.setEditorTimeout(n,function(){var e;e=r.auto_focus===!0?n:n.editorManager.get(r.auto_focus),e.destroyed||e.focus()},100),s=h=p=null},focus:function(e){function t(e){return n.dom.getParent(e,function(e){return"true"===n.dom.getContentEditable(e)})}var n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l=n.getBody(),c;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n.quirks.refreshContentEditable(),c=t(r.getNode()),n.$.contains(l,c))return c.focus(),r.normalize(),void n.editorManager.setActive(n);if(i||(w.opera||n.getBody().focus(),n.getWin().focus()),W||i){if(l.setActive)try{l.setActive()}catch(u){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.setActive(n)},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?F(r):0,n=F(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?P(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),e.length>1?i[I(e[0])]=I(e[1]):i[I(e[0])]=I(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n=this,r;n.contextToolbars=n.contextToolbars||[],"string"==typeof e&&(r=e,e=function(e){return n.dom.is(e,r)}),n.contextToolbars.push({predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(B.show(e.getContainer()),B.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(V&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(B.hide(e.getContainer()),B.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),"raw"==e.format&&t.fire("RawSaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=B.getParent(t.id,"form"))&&P(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&t.setDirty(!1),r},setContent:function(e,t){var n=this,r=n.getBody(),i,o;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(o=V&&11>V?"":'<br data-mce-bogus="1">',"TABLE"==r.nodeName?e="<tr><td>"+o+"</td></tr>":/^(UL|OL)$/.test(r.nodeName)&&(e="<li>"+o+"</li>"),i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=o,e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):V||e||(e='<br data-mce-bogus="1">'),n.dom.setHTML(r,e),n.fire("SetContent",t)):("raw"!==t.format&&(e=new s({validate:n.validate},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=I(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?t.serializer.getTrimmedContent():"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),"text"!=e.format?e.content=I(n):e.content=n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=L({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){S.setMode(this,e)},getContainer:function(){var e=this;return e.container||(e.container=B.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=B.get(this.id)),this.targetElm},getWin:function(){var e=this,t;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),P(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||!n.hasVisual?i.removeClass(e,o):i.addClass(e,o));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&n.hasVisual?i.addClass(e,o):i.removeClass(e,o)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&B.remove(e.getElement().nextSibling),e.inline||(V&&10>V&&e.getDoc().execCommand("SelectAll",!1,null),B.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),B.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),B.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},L(A.prototype,_),A}),r(Je,[],function(){var e={},t="en";return{setCode:function(e){e&&(t=e,this.rtl=this.data[e]?"rtl"===this.data[e]._dir:!1)},getCode:function(){return t},rtl:!1,add:function(t,n){var r=e[t];r||(e[t]=r={});for(var i in n)r[i]=n[i];this.setCode(t)},translate:function(n){var r;if(r=e[t],r||(r={}),"undefined"==typeof n)return n;if("string"!=typeof n&&n.raw)return n.raw;if(n.push){var i=n.slice(1);n=(r[n[0]]||n[0]).replace(/\{([0-9]+)\}/g,function(e,t){return i[t]})}return(r[n]||n).replace(/{context:\w+}$/,"")},data:e}}),r(Qe,[w,u,h],function(e,t,n){function r(e){function l(){try{return document.activeElement}catch(e){return document.body}}function c(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function u(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function d(e){return!!s.getParent(e,r.isEditorUIElement)}function f(r){var f=r.editor;f.on("init",function(){(f.inline||n.ie)&&("onbeforedeactivate"in document&&n.ie<9?f.dom.bind(f.getBody(),"beforedeactivate",function(e){if(e.target==f.getBody())try{f.lastRng=f.selection.getRng()}catch(t){}}):f.on("nodechange mouseup keyup",function(e){var t=l();"nodechange"==e.type&&e.selectionChange||(t&&t.id==f.id+"_ifr"&&(t=f.getBody()),f.dom.isChildOf(t,f.getBody())&&(f.lastRng=f.selection.getRng()))}),n.webkit&&!i&&(i=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(f.lastRng=n)}},s.bind(document,"selectionchange",i)))}),f.on("setcontent",function(){f.lastRng=null}),f.on("mousedown",function(){f.selection.lastFocusBookmark=null}),f.on("focusin",function(){var t=e.focusedEditor,n;f.selection.lastFocusBookmark&&(n=u(f,f.selection.lastFocusBookmark),f.selection.lastFocusBookmark=null,f.selection.setRng(n)),t!=f&&(t&&t.fire("blur",{focusedEditor:f}),e.setActive(f),e.focusedEditor=f,f.fire("focus",{blurredEditor:t}),f.focus(!0)),f.lastRng=null}),f.on("focusout",function(){t.setEditorTimeout(f,function(){var t=e.focusedEditor;d(l())||t!=f||(f.fire("blur",{focusedEditor:null}),e.focusedEditor=null,f.selection&&(f.selection.lastFocusBookmark=null))})}),o||(o=function(t){var n=e.activeEditor,r;r=t.target,n&&r.ownerDocument==document&&(n.selection&&r!=n.getBody()&&(n.selection.lastFocusBookmark=c(n.dom,n.lastRng)),r==document.body||d(r)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},s.bind(document,"focusin",o)),f.inline&&!a&&(a=function(t){var n=e.activeEditor;if(n.inline&&!n.dom.isChildOf(t.target,n.getBody())){var r=n.selection.getRng();r.collapsed||(n.lastRng=r)}},s.bind(document,"mouseup",a))}function h(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(s.unbind(document,"selectionchange",i),s.unbind(document,"focusin",o),s.unbind(document,"mouseup",a),i=o=a=null)}e.on("AddEditor",f),e.on("RemoveEditor",h)}var i,o,a,s=e.DOM;return r.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},r}),r(Ze,[Ge,g,w,ie,h,m,c,le,Je,Qe],function(e,t,n,r,i,o,a,s,l,c){function u(e){g(C.editors,function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})}function d(e,n){n!==x&&(n?t(window).on("resize scroll",u):t(window).off("resize scroll",u),x=n)}function f(e){var t=C.editors,n;delete t[e.id];for(var r=0;r<t.length;r++)if(t[r]==e){t.splice(r,1),n=!0;break}return C.activeEditor==e&&(C.activeEditor=t[0]),C.focusedEditor==e&&(C.focusedEditor=null),n}function h(e){return e&&!(e.getContainer()||e.getBody()).parentNode&&(f(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null),e}var p=n.DOM,m=o.explode,g=o.each,v=o.extend,y=0,b,C,x=!1;return C={$:t,majorVersion:"4",minorVersion:"3.10",releaseDate:"2016-04-12",editors:[],i18n:l,activeEditor:null,setup:function(){var e=this,t,n,i="",o,a;if(n=r.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/")),o=window.tinymce||window.tinyMCEPreInit)t=o.base||o.baseURL,i=o.suffix;else{for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){a=s[l].src;var u=a.substring(a.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)){-1!=u.indexOf(".min")&&(i=".min"),t=a.substring(0,a.lastIndexOf("/"));break}}!t&&document.currentScript&&(a=document.currentScript.src,-1!=a.indexOf(".min")&&(i=".min"),t=a.substring(0,a.lastIndexOf("/")))}e.baseURL=new r(n).toAbsolute(t),e.documentBaseURL=n,e.baseURI=new r(e.baseURL),e.suffix=i,e.focusManager=new c(e)},overrideDefaults:function(e){var t,n;t=e.base_url,t&&(this.baseURL=new r(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new r(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n),this.defaultSettings=e},init:function(n){function r(e){var t=e.id;return t||(t=e.name,t=t&&!p.get(t)?e.name:p.uniqueId(),e.setAttribute("id",t)),t}function i(e){var t=n[e];if(t)return t.apply(u,Array.prototype.slice.call(arguments,2))}function s(e,t){return t.constructor===RegExp?t.test(e.className):p.hasClass(e,t)}function l(e){var t,n=[];if(e.types)return g(e.types,function(e){n=n.concat(p.select(e.selector))}),n;if(e.selector)return p.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":t=e.elements||"",t.length>0&&g(m(t),function(e){var t;(t=p.get(e))?n.push(t):g(document.forms,function(t){g(t.elements,function(t){t.name===e&&(e="mce_editor_"+y++,p.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":g(p.select("textarea"),function(t){e.editor_deselector&&s(t,e.editor_deselector)||e.editor_selector&&!s(t,e.editor_selector)||n.push(t)})}return n}function c(){function a(t,n,r){if(!h(u.get(t))){var i=new e(t,n,u);d.push(i),i.on("init",function(){++s===m.length&&f(d)}),i.targetElm=i.targetElm||r,i.render()}}var s=0,d=[],m;return p.unbind(window,"ready",c),i("onpageload"),m=t.unique(l(n)),n.types?void g(n.types,function(e){o.each(m,function(t){return p.is(t,e.selector)?(a(r(t),v({},n,e),t),!1):!0})}):void g(m,function(e){a(r(e),n,e)})}var u=this,d,f=function(e){d=e};return u.settings=n,p.bind(window,"ready",c),new a(function(e){d?e(d):f=function(t){e(t)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),d(n,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),b||(b=function(){t.fire("BeforeUnload")},p.bind(window,"beforeunload",b)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void g(p.select(e),function(e){i=r[e.id],i&&t.remove(i)})):(i=e,r[i.id]?(f(i)&&t.fire("RemoveEditor",{editor:i}),r.length||p.unbind(window,"beforeunload",b),i.remove(),d(r,r.length>0),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){g(this.editors,function(e){e.save()})},addI18n:function(e,t){l.add(e,t)},translate:function(e){return l.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!=e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},v(C,s),C.setup(),window.tinymce=window.tinyMCE=C,C}),r(et,[Ze,m],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(n,r){"html4"===t.settings.schema&&e(r,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(tt,[le,m],function(e,t){var n={send:function(e){function r(){!e.async||4==i.readyState||o++>1e4?(e.success&&1e4>o&&200==i.status?e.success.call(e.success_scope,""+i.responseText,i,e):e.error&&e.error.call(e.error_scope,o>1e4?"TIMED_OUT":"GENERAL",i,e),i=null):setTimeout(r,10)}var i,o=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async!==!1,e.data=e.data||"",n.fire("beforeInitialize",{settings:e}),i=new XMLHttpRequest){if(i.overrideMimeType&&i.overrideMimeType(e.content_type),i.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(i.withCredentials=!0),e.content_type&&i.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&t.each(e.requestheaders,function(e){i.setRequestHeader(e.key,e.value)}),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i=n.fire("beforeSend",{xhr:i,settings:e}).xhr,i.send(e.data),!e.async)return r();setTimeout(r,10)}}};return t.extend(n,e),n}),r(nt,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb	t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r<t.length;r++)i+=(r>0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");

#23 in reply to: ↑ 22 ; follow-up: @joshf
2 years ago

Replying to webmasteral:

After trying your fix the problem was still present in a vanilla WP install on both Chrome (50.0.2661.75) and Firefox (45.0.2). Chrome console error log for tinymce.min.js vr 4.3.10 showed the following

tinymce.min.js?ver=4310-20160412:11 Uncaught TypeError: c is not a constructor 
tinymce.min.js?ver=4310-20160412:11 Uncaught TypeError: Cannot read property 'body' of undefined

Here's how I was able to fix the issue in my vanilla WP install.

  1. Download TinyMCE 4.3.10.
  2. Extract the tinymce folder.
  3. Upload the entire contents of the extracted folder to wp-includes/js/tinymce. Overwrite all the files.
  4. Clear cache and refresh.

I've successfully "patched" 3 sites experiencing this issue using this method.

EDIT: I just downloaded the tinymce folder from the latest trunk and successfully patched a site using the same method described above. This issue is resolved on my end using the latest trunk.

Last edited 2 years ago by joshf (previous) (diff)

#24 in reply to: ↑ 23 @webmasteral
2 years ago

Replying to joshf:

Replying to webmasteral:

After trying your fix the problem was still present in a vanilla WP install on both Chrome (50.0.2661.75) and Firefox (45.0.2). Chrome console error log for tinymce.min.js vr 4.3.10 showed the following

tinymce.min.js?ver=4310-20160412:11 Uncaught TypeError: c is not a constructor 
tinymce.min.js?ver=4310-20160412:11 Uncaught TypeError: Cannot read property 'body' of undefined

Here's how I was able to fix the issue in my vanilla WP install.

  1. Download TinyMCE 4.3.10.
  2. Extract the tinymce folder.
  3. Upload the entire contents of the extracted folder to wp-includes/js/tinymce. Overwrite all the files.
  4. Clear cache and refresh.

I've successfully "patched" 3 sites experiencing this issue using this method.

Tried your fix, downloaded and overrode all the files, re-uploaded, cleared cache but came to the same problem with both Chrome and Firefox.

Chrome console error log

c is not a constructorA.init @ tinymce.min.js?ver=4310-20160412:11(anonymous function) @ tinymce.min.js?ver=4310-20160412:11(anonymous function) @ tinymce.min.js?ver=4310-20160412:4n @ tinymce.min.js?ver=4310-20160412:3p @ tinymce.min.js?ver=4310-20160412:4(anonymous function) @ tinymce.min.js?ver=4310-20160412:4i @ tinymce.min.js?ver=4310-20160412:4

@joshf

That was my first try, I downloaded the latest trunk files but still had the same issues so then I tried @azaozz fix. Very strange that this problem doesn't seem to want to clear.

Last edited 2 years ago by webmasteral (previous) (diff)

#25 follow-up: @azaozz
2 years ago

Replying to webmasteral:

After trying your fix the problem was still present in a vanilla WP install on both Chrome tinymce.min.js?ver=4310-20160412:11 Uncaught TypeError: c is not a constructor

If you are still loading tinymce.min.js, it means either SCRIPT_DEBUG is set to true or for some reason your site doesn't support compressing the output. Try updating the whole wp-includes/js/tinymce directory from a fresh nightly build.

Replying to joshf:

I just downloaded the tinymce folder from the latest trunk and successfully patched a site using the same method described above. This issue is resolved on my end using the latest trunk.

Thanks for testing that.

#26 in reply to: ↑ 25 @webmasteral
2 years ago

Replying to azaozz:

Replying to webmasteral:

After trying your fix the problem was still present in a vanilla WP install on both Chrome tinymce.min.js?ver=4310-20160412:11 Uncaught TypeError: c is not a constructor

If you are still loading tinymce.min.js, it means either SCRIPT_DEBUG is set to true or for some reason your site doesn't support compressing the output. Try updating the whole wp-includes/js/tinymce directory from a fresh nightly build.

Replying to joshf:

I just downloaded the tinymce folder from the latest trunk and successfully patched a site using the same method described above. This issue is resolved on my end using the latest trunk.

Thanks for testing that.

I have checked and SCRIPT_DEBUG is set to 'false' on the config file.

I downloaded the latest night build from the link, deleted all files on the server inside /wp-includes/js/tinymce and re-uploaded, cleared all local cache but still getting the same error. Tried with both htaccess gzip enabled and removed. Not sure what else to try.

#27 @webmasteral
2 years ago

I went back to the drawing board and did a total fresh install of WP, updated the TinyMCE from the night build, updated version.php and now the Chrome console is giving me the following errors.

theme.min.js?wp-mce-4310-20160412 403 script tinymce.min.js?ver=4310-20160412:4 plugin.min.js?wp-mce-4310-20160412 403 script tinymce.min.js?ver=4310-20160412:4

I am at a total loss as to why these would be getting a 403 error code as the .htaccess is not present on the server.

So a little digging in the console tells me that the server is 403'ing the tinymce plugins folder and the themes folder.

After some more poking around I have tried adding htaccss files to each folder with no luck, I found a site saying something about adding 'define('CONCATENATE_SCRIPTS', false);' to the config file, that did nothing, and last "I had the same problem. It was a security setting on the server, blocking urls with variables. Wordpress inludes tinymce files with variable in the end: wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-4203-20150730" but have yet to see a setting in my php.ini file that could be blocking this.

After deleting the htaccess file that was sitting on the root folder everything worked in the vanilla WP install + night build tinymce upload.

Making progress.

Last edited 2 years ago by webmasteral (previous) (diff)

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


2 years ago

#29 @azaozz
2 years ago

There are two more (small) fixes needed for TinyMCE 4.3.10:

Thanks @spocke for the notice :)

#30 @azaozz
2 years ago

In 37251:

TinyMCE: backport fixes for 4.3.10:

See #36545, for trunk.

#31 @azaozz
2 years ago

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

In 37253:

TinyMCE:

https://github.com/tinymce/tinymce/commit/5462e3c1ddcc014bcf6d599239465287f1b9bbe3.

Merges [37242] and [37251] to the 4.5 branch.
Fixes #36545 for 4.5.

#32 in reply to: ↑ 21 @doncullen
2 years ago

Good news, @azaozz -- I applied the patch exactly as you said to (replaced it with files from trunk, debug already set to false, and updated version file) -- working like a charm now with no issues, no errors. Everything works as expected. That did the trick. Thanks!

Replying to azaozz:

Replying to doncullen:

I'd be happy to update my copy of TinyMCE in my installation of WordPress if you can let me know what the best way to do that would be.

Right. In production TinyMCE is loaded differently than the rest of the JS. Best way to try 4.3.10 is to replace wp-tinymce.js.gz with the latest version from here: https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce and NOT have SCRIPT_DEBUG set in your wp-config.php (or set to false).

Then make sure to empty the browser cache and refresh the page after loading few times. Can also change the $tinymce_version string in wp-includes/version.php to help with cache busting.

#33 @hollowstar1
2 years ago

Thank you doncullen for opening this ticket, and azaoozz for the fixes to tinymce. I had the same issue and can confirm it now works with these new files.

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


2 years ago

#35 @jackalope
2 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Hello guys here i'm on a macbook with chrome latest stable version 50.0.2661.86 (64-bit) updated now wordpress to 4.5.1 that should correct bug #36545 WordPress TinyMCE toolbar/tabs unresponsive in Chrome Version 50.0.2661.75 beta-m (64-bit)

but, still having the exactly same error already cleared my cache but still in error...

If i restore tinymce before 4.5 (because i got error also with 4.5) all works perfectly....

#36 @ocean90
2 years ago

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

@jackalope Please open a new ticket because this ticket was closed on a completed milestone.

Also, please take a look at https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors and post the results in the new ticket too. Thanks!

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


2 years ago

Note: See TracTickets for help on using tickets.