Make WordPress Core

Opened 9 years ago

Closed 4 weeks ago

#36933 closed defect (bug) (worksforme)

TinyMCE failing when using ModPagespeed

Reported by: franmawp's profile franmaWp Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5.2
Component: Administration Keywords:
Focuses: javascript Cc:

Description

TinyMCE Stops working correctly When using ModPagespeed module.

TypeError: wp.svgPainter is undefined

I needed to edit this file to fix the issue:

/wp-admin/js/svg-painter.js

Change History (7)

#1 follow-up: @lukecavanagh
9 years ago

Is this on Apache or NGNIX?

#2 in reply to: ↑ 1 @franmaWp
9 years ago

Replying to lukecavanagh:

Is this on Apache or NGNIX?

It is in Apache.

#3 @azaozz
9 years ago

  • Keywords reporter-feedback added

Sounds like the svg-painter.js file is not loaded for some reason. That triggers a JS error that prevents TinyMCE from working properly.

Assuming you're running from /src or have SCRIPT_DEBUG defined, does that happen when you run from /build or set SCRIPT_DEBUG to false?

#4 @azaozz
9 years ago

  • Component changed from TinyMCE to Administration

#5 @franmaWp
8 years ago

svg-painter.js is loaded correctly but when this code from svg-painter.js is executed:

$(document).ready( function() {
		// detection for browser SVG capability
		if ( document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' ) ) {
			$( document.body ).removeClass( 'no-svg' ).addClass( 'svg' );
			wp.svgPainter.init();
		}
	});

i get "TypeError: wp.svgPainter is undefined" then many Js admin functionalities stop working. To solve the problem i move that script out of wp.svgPainter Object.

To test this i am having SCRIPT_DEBUG=true

Any suggestions? thanks.

#6 @franmaWp
8 years ago

  • Keywords reporter-feedback removed

#7 @desrosj
4 weeks ago

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

I found this one in a report of tickets missing a milestone.

Quite a bit has changed in the last 8 years, but I've gone and done some testing to try and replicate this.

To test, I am using the local Docker environment in wordpress-develop with today's state of trunk and I've replaced the standard nginx container with one containing the PageSpeed plugin. It's configured, confirmed on, and I'm seeing the caching happen in the configured folder.

TinyMCE is no longer the default experience for WordPress, so I've gone and activated the Classic Editor plugin. Following this, I've been unable to encounter any breaking of TinyMCE.

It looks like TinyMCE was version 4.3.10 in WordPress 4.5.2 (see [37253]). The version currently included in Core is 4.9.11.

svg-painter has also undergone a minimal number of changes since:

Since I cannot find any other reports of this issue here on Trac in the 8 years since this last saw activity, I'm going to close this out as worksforme. Whatever was causing this seems to have been a configuration issue specific to @franmaWp's server, or a bug that has since been fixed through one of the many changes since this report was submitted.

Note: See TracTickets for help on using tickets.