From 03a8aa546e01903d0c09e35833ffcb77969a1da8 Mon Sep 17 00:00:00 2001 From: Mateusz Uzdowski Date: Wed, 11 Apr 2012 18:36:32 +0200 Subject: [PATCH] BUGFIX Only load existing languages in custom TinyMCE plugins to avoid the tinymce_gzip.php logic stalling (fixes #7035) --- javascript/tinymce_ssbuttons/editor_plugin_src.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/javascript/tinymce_ssbuttons/editor_plugin_src.js b/javascript/tinymce_ssbuttons/editor_plugin_src.js index 1be75784..699f5f9e 100644 --- a/javascript/tinymce_ssbuttons/editor_plugin_src.js +++ b/javascript/tinymce_ssbuttons/editor_plugin_src.js @@ -1,5 +1,12 @@ (function() { - tinymce.PluginManager.requireLangPack("ssbuttons"); + + // TinyMCE will stop loading if it encounters non-existent external script file + // when included through tiny_mce_gzip.php. Only load the external lang package if it is available. + var availableLangs = ['en', 'de']; + if(jQuery.inArray(tinymce.settings.language, availableLangs) != -1) { + tinymce.PluginManager.requireLangPack("ssbuttons"); + } + var each = tinymce.each; tinymce.create('tinymce.plugins.SSButtons', {