Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#36933 new defect (bug)

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 (6)

#1 follow-up: @lukecavanagh
8 years ago

Is this on Apache or NGNIX?

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

Replying to lukecavanagh:

Is this on Apache or NGNIX?

It is in Apache.

#3 @azaozz
8 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
8 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
Note: See TracTickets for help on using tickets.