Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#15788 closed defect (bug) (wontfix)

wp-tinymce.php sends the wrong uncompressed file

Reported by: fejesjoco Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.2
Component: Editor Keywords:
Focuses: Cc:


If compression is enabled in the browser, it sends wp-tinymce.js.gz which works fine. If not (try in Firefox about:config -> network.http.accept-encoding), it sends tiny_mce.js. The first problem you see in browsers is that there is no 'go' method in the latter one. These two javascript files seem very different, the compressed one has a whole lot of added functionality. Solving it is easy: ship the same javascript file compressed and uncompressed. You might want to consider on-the-fly compressing/decompressing and keeping only one copy of this file in the source code to completely avoid future situations like this.

Change History (1)

#1 @nacin
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This is proper functionality.

wp-tinymce.js.gz includes A) tinymce, B) every editor_plugin.js, and C) a small bit of code to load the plugins (with the go method).

If gz isn't accepted, then we send tiny_mce.js and each plugin individually.

Browsers that don't support gz won't support TinyMCE anyway, so we have this fallback in place, rather than packaging wp-tinymce.js, which is a very big file. (It was actually removed in 3.0 to keep the download package size down.)

Note: See TracTickets for help on using tickets.