Opened 15 years ago
Closed 11 years ago
#14232 closed defect (bug) (invalid)
tiny_mce.js different from wp-tinymce.js.gz
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | TinyMCE | Keywords: | |
Focuses: | javascript | Cc: |
Description
I was having a proxy issue that was interfering with gzip'd transfers when I noticed that tiny_mce.js and wp-tinymce.js.gz were different. The non gzipped version of the file seems to be missing quite a lot of code that the gzipped one has. Getting served the non-gzipped JS file seems to break the editor.
This seems to be the case in WP 3.0 and 2.9.2. Probably earlier versions too.
The files should be set to they are exactly the same yes?
Change History (7)
#2
@
15 years ago
- Keywords tinyMCE removed
- Resolution set to invalid
- Status changed from new to closed
- Version 3.0 deleted
As @nacin explained wp-tinymce.js.gz includes the TinyMCE core plus all of the plugins from tinymce/plugins/ and a small script to pre-load them.
If you're having problems loading the gzipped file through your proxy you can disable compression. This will load tiny_mce.js and TinyMCE will load its plugins with JS (of course that will be slower).
#4
follow-up:
↓ 5
@
11 years ago
- Focuses javascript added
- Resolution invalid deleted
- Status changed from closed to reopened
- Version set to 3.8.1
I have come across this issue in 3.8.1. It's not that the files are different, but that if for some reason the gzip version doesn't work, the default file loaded is looking for a language files that don't exist.
When wp-tinymce.php
imports tiny_mce.js
, browser errors show requests for langs/en.js
and themes/advanced/langs/en.js
. This is because in WP the language file is langs/wp-langs-en.js
#5
in reply to:
↑ 4
@
11 years ago
- Keywords reporter-feedback added
- Milestone set to Awaiting Review
Replying to flipstorm:
I have come across this issue in 3.8.1. It's not that the files are different, but that if for some reason the gzip version doesn't work, the default file loaded is looking for a language files that don't exist.
Does it still happen with all plugins disabled and a default theme (Twenty Fourteen or Twenty Thirteen) activated?
#6
@
11 years ago
- Keywords close added; reporter-feedback removed
In WordPress the localization for TinyMCE is loaded differently. Instead of "static" JS files, it is generated with PHP so all strings can be translated in all supported languages. Then the language is "marked as loaded" in TinyMCE so it doesn't look for the default localization files.
If you load tinymce.min.js or use wp-tinymce.php directly, you'll have to load the localization file(s) for it too. In WordPress this is done with https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-includes/class-wp-editor.php#L751.
tiny_mce.js is TInyMCE core. wp-tinymce.js.gz includes WP plugins. The non-gzipped version of the latter, wp-tinymce.js, did exist in 2.9.2, but it was pulled in 3.0 as any browser that can handle TinyMCE can also handle the gzipped file.