升级后,小型mce停止工作(修改后的URL)

Pet*_*ter 5 javascript url tinymce

我使用小型mce(版本3.2.6)已经很长时间了(没有任何问题),但是想将它升级到更新的版本(3.4.2).升级的原因是第三方插件(拼写检查程序)的一些问题 - 在尝试使用更新的版本之后,这些问题得到了解决并且在开发人员环境中.一切正常.在实时环境中出现问题(在向客户端提供新版本的应用程序之后),在客户端,您可以通过两种方式连接到应用程序(使用小型mce):

(1)类型地址(所以正常方式,一切正常)

(2)使用某种门户网站 - 客户端应用程序,由于某些我不知道的原因修改网址 - 使用这种方式,Tiny mce在升级到(3.4.2)后停止工作.(我已经仔细检查了,这只与微小的mce版本更新有关,而不是与插件或其他问题有关).

客户端门户网站转换网址的方式如下所示:未转换的网址:

HTTP://server.address/blabla/js/jsFileName.js V = 123

转换后的网址(从小提琴手抓住):

https://client.portal.com/http://server.address/blabla/js/jsFileName.js?v=123&psScriptReferrer=http://server.address/blabla/

正如我之前所说,'旧'版本(3.2.6)工作正常(即使是那些神奇转换的网址),更新微小的mce(没有更改配置或其他任何东西)后出现问题.我得到的错误是:

q is not a constructor
https://client.portal.com/http://server.address/blabla/js/tiny_mce/tiny_mce.js?v=123&psScriptReferrer=http://server.address/blabla/
Line 1

(function(d){var a=/^\s*|\s*$/g,e,c="B...{a.selection.onSetContent.add(f)})}});
Run Code Online (Sandbox Code Playgroud)

我在所有浏览器上都看到了这个错误(检查:IE6/IE8/FF3.6).这也导致微小的mce未加载(仅显示"plain-html"文本输入).

我的假设是新版本包含一些正则表达式,而神奇转换的链接包含多个"http"字符串.

我已尝试对以下参数进行一些更改(将它们设置为0) - 没有运气:convert_urls:1,relative_urls:1,remove_script_host:1

它还是一个'promissing'参数:document_base_url:tinymce.documentBaseURL

但由于这个应用程序应该使用上述(1)和(2)中描述的两种方式工作,我不能只是硬编码那里的链接(这听起来像一个非常脆弱的解决方案).

我无法100%肯定地说这是一个错误,因为使用'普通'地址一切正常.另一方面,我无法对这些网址转换做任何事情.

<script type="text/javascript">
    tinyMCE.init({
        mode : "exact",
        elements : "content, contentFr",
        theme : "advanced",
        plugins : "spellchecker",
        spellchecker_languages : "+English=en_CA,French=fr",
        spellchecker_rpc_url : "jmyspell-spellchecker",

        // Theme options
        theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,fontselect,fontsizeselect,|,forecolor,backcolor,sub,sup",
        theme_advanced_buttons2 : "link,unlink,|,bullist,numlist,|,justifyleft,justifycenter,justifyright,justifyfull,|,code,|,spellchecker",
        theme_advanced_buttons3 : "",
        theme_advanced_buttons4 : "",

        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,
        theme_advanced_resize_horizontal : 0,
        theme_advanced_path: false,
        content_css : "css/tinyMCE_custom.css",
        oninit: function(){
            tinyMCE.get('content').setContent('some text here');
            tinyMCE.get('contentFr').setContent('some different text here');
        }
    });
    </script>
Run Code Online (Sandbox Code Playgroud)

感谢您的帮助/提示.

问候,

彼得

Luc*_*125 1

我会尝试升级到 TinyMCE 的当前版本,即3.4.3。

在该版本的changelog.txt 文件中,除了许多其他错误修复之外,还有以下内容:

“修复了解析相对 URI 时在tinymce.util.URI 中引发异常且未提供 base_uri 设置的错误。”

我不确定它会解决您的问题,但使用最新版本应该会更容易,因为不同的问题不太可能相互干扰。